Commit 3c32fd63 by 陈健智

新增事件详情-持续事件,新事件详情页不鉴权拦截

parent 496fa742
......@@ -249,4 +249,11 @@ public class AppEventController extends BaseController {
@RequestParam(value = "aggTitle", required = false) String aggTitle){
return ResponseResult.success(eventService.eventTopArticlesAnalysis(eventId, type, emotion, aggTitle));
}
@ApiOperation("前台事件库-事件详情-持续事件")
@GetMapping("/detail/continue-event")
public ResponseResult continueEvent(@RequestParam(value = "eventId") String eventId){
eventService.continueEvent(eventId);
return ResponseResult.success();
}
}
......@@ -22,6 +22,6 @@ public class InterceptorConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 自定义拦截器,添加拦截路径和排除拦截路径
registry.addInterceptor(mainAuthInterceptor).addPathPatterns("/app/**","/admin/**").excludePathPatterns();
registry.addInterceptor(mainAuthInterceptor).addPathPatterns("/app/**","/admin/**").excludePathPatterns("/app/event/detail/**");
}
}
......@@ -394,4 +394,10 @@ public interface EventService {
* @return
*/
JSONObject eventTopArticlesAnalysis(String eventId, String type, String emotion, String aggTitle);
/**
* 持续事件
* @param eventId 事件id
*/
void continueEvent(String eventId);
}
......@@ -863,6 +863,16 @@ public class EventServiceImpl implements EventService {
return eventClient.eventTopArticlesAnalysis(eventId, type, emotion, aggTitle);
}
@Override
public void continueEvent(String eventId) {
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = Objects.requireNonNull(requestAttributes).getRequest();
String submitterId = JwtUtil.unsign(request.getHeader(jwtKey), Map.class).get(GenericAttribute.USER_ID).toString();
String submitter = userService.queryUserInfo(submitterId, UserThreadLocal.getProjectId()).getNickname();
eventClient.continueEvent(eventId, submitter, submitterId);
}
@Data
public static class MongoQueryUtil {
......
......@@ -52,7 +52,7 @@ mark.registry.address=zookeeper://192.168.0.11:2181?backup=192.168.0.30:2181,192
mark.provider.group=zhiwei-mark-test_liuyu
#\u4E8B\u4EF6\u4E2D\u95F4\u4EF6
event.registry.address=zookeeper://192.168.0.11:2181?backup=192.168.0.30:2181,192.168.0.35:2181
event.provider.group=zhiwei-event
event.provider.group=zhiwei-event-ygd
#\u7528\u6237\u4E2D\u5FC3
auth.center.client.consumer.group=zhiwei-auth-dev-liuyu
auth.center.client.registry.address=zookeeper://192.168.0.11:2181?backup=192.168.0.30:2181,192.168.0.35:2181
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment