Commit b305c489 by shenjunjie

Merge branch 'feature' into 'release'

事件库-事件分析新增全量数据、去噪数据选择

See merge request !371
parents ba323c08 67e6d009
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<dubbo.version>2.7.4.1</dubbo.version> <dubbo.version>2.7.4.1</dubbo.version>
<curator.version>2.12.0</curator.version> <curator.version>2.12.0</curator.version>
<push.log.version>2.17.0-SNAPSHOT</push.log.version> <push.log.version>2.17.0-SNAPSHOT</push.log.version>
<event-client.version>1.0.9.4-SNAPSHOT</event-client.version> <event-client.version>1.0.9.6-SNAPSHOT</event-client.version>
<cleaner-unified-filter.version>1.1.5-SNAPSHOT</cleaner-unified-filter.version> <cleaner-unified-filter.version>1.1.5-SNAPSHOT</cleaner-unified-filter.version>
</properties> </properties>
......
...@@ -22,6 +22,8 @@ import org.springframework.http.ResponseEntity; ...@@ -22,6 +22,8 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import java.util.List;
/** /**
* @Description: 前台事件库 * @Description: 前台事件库
* @Author: shentao * @Author: shentao
...@@ -187,8 +189,8 @@ public class AppEventController extends BaseController { ...@@ -187,8 +189,8 @@ public class AppEventController extends BaseController {
@ApiOperation("前台事件库-事件监测-新增事件监测") @ApiOperation("前台事件库-事件监测-新增事件监测")
@PostMapping("/addEventMonitor") @PostMapping("/addEventMonitor")
public ResponseResult addEventMonitor(@RequestBody EventDTO dto){ public ResponseResult addEventMonitor(@RequestBody EventDTO dto){
if (eventService.getMonitoringEventsCount() >= 10){ if (eventService.getMonitoringEventsCount() >= 5){
return ResponseResult.failure("监测事件数量不得超过10"); return ResponseResult.failure("监测事件数量不得超过5");
} }
eventService.addEventMonitor(dto); eventService.addEventMonitor(dto);
return ResponseResult.success(); return ResponseResult.success();
...@@ -272,4 +274,18 @@ public class AppEventController extends BaseController { ...@@ -272,4 +274,18 @@ public class AppEventController extends BaseController {
eventService.continueEvent(eventId); eventService.continueEvent(eventId);
return ResponseResult.success(); return ResponseResult.success();
} }
@ApiOperation("前台事件库-事件分析-手动更新")
@PutMapping("/manual-update/{eventId}")
public ResponseResult modifyMonitorEventStatus(@PathVariable String eventId){
eventService.modifyMonitorEventStatusToManualUpdate(eventId);
return ResponseResult.success();
}
@ApiOperation("前台事件库-事件分析-轮询事件状态")
@PostMapping("/schedule")
public ResponseResult scheduleEventStatus(@RequestBody JSONObject json){
List<String> eventIds = json.getJSONArray("eventIds").toJavaList(String.class);
return ResponseResult.success(eventService.scheduleEventStatus(eventIds));
}
} }
...@@ -324,4 +324,18 @@ public interface EventMiddlewareDao { ...@@ -324,4 +324,18 @@ public interface EventMiddlewareDao {
* @return * @return
*/ */
Map<String, Integer> getTopPlatformAnyEmotion(Long startTime, Long endTime, String emotion, String projectId, String contendId); Map<String, Integer> getTopPlatformAnyEmotion(Long startTime, Long endTime, String emotion, String projectId, String contendId);
/**
* 将监测事件修改为手动更新状态
* @param eventId
* @return
*/
ReturnData modifyMonitorEventStatusToManualUpdate(String eventId);
/**
* 轮询监测事件更新状态
* @param eventIds
* @return
*/
ReturnData scheduleEventStatus(List<String> eventIds);
} }
...@@ -221,4 +221,14 @@ public class EventMiddlewareDaoImpl implements EventMiddlewareDao { ...@@ -221,4 +221,14 @@ public class EventMiddlewareDaoImpl implements EventMiddlewareDao {
public Map<String, Integer> getTopPlatformAnyEmotion(Long startTime, Long endTime, String emotion, String projectId, String contendId) { public Map<String, Integer> getTopPlatformAnyEmotion(Long startTime, Long endTime, String emotion, String projectId, String contendId) {
return eventClient.getTopPlatformAnyEmotion(startTime, endTime, emotion, projectId, contendId); return eventClient.getTopPlatformAnyEmotion(startTime, endTime, emotion, projectId, contendId);
} }
@Override
public ReturnData modifyMonitorEventStatusToManualUpdate(String eventId) {
return eventMonitorClient.modifyMonitorEventStatusToManualUpdate(eventId);
}
@Override
public ReturnData scheduleEventStatus(List<String> eventIds) {
return eventMonitorClient.scheduleEventStatus(eventIds);
}
} }
...@@ -422,4 +422,18 @@ public interface EventService { ...@@ -422,4 +422,18 @@ public interface EventService {
* @param eventId 事件id * @param eventId 事件id
*/ */
void continueEvent(String eventId); void continueEvent(String eventId);
/**
* 将监测事件修改为手动更新状态
* @param eventId
* @return
*/
void modifyMonitorEventStatusToManualUpdate(String eventId);
/**
* 轮询监测事件更新状态
* @param eventIds
* @return
*/
JSONObject scheduleEventStatus(List<String> eventIds);
} }
...@@ -883,6 +883,16 @@ public class EventServiceImpl implements EventService { ...@@ -883,6 +883,16 @@ public class EventServiceImpl implements EventService {
eventMiddlewareDao.continueEvent(eventId, submitter, submitterId); eventMiddlewareDao.continueEvent(eventId, submitter, submitterId);
} }
@Override
public void modifyMonitorEventStatusToManualUpdate(String eventId) {
eventMiddlewareDao.modifyMonitorEventStatusToManualUpdate(eventId);
}
@Override
public JSONObject scheduleEventStatus(List<String> eventIds) {
return (JSONObject) eventMiddlewareDao.scheduleEventStatus(eventIds).getData();
}
@Data @Data
public static class MongoQueryUtil { public static class MongoQueryUtil {
......
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