From f63aceb283bf8df4c8108db0186082a10ec889c9 Mon Sep 17 00:00:00 2001 From: zhangdonghao Date: Mon, 27 May 2024 13:42:19 +0800 Subject: [PATCH] [Bug] [Alert] The alarm list is not sorted by alarm time #565 --- .../impl/ClusterAlertHistoryServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/datasophon-service/src/main/java/com/datasophon/api/service/impl/ClusterAlertHistoryServiceImpl.java b/datasophon-service/src/main/java/com/datasophon/api/service/impl/ClusterAlertHistoryServiceImpl.java index 5381e4d7..30bb088b 100644 --- a/datasophon-service/src/main/java/com/datasophon/api/service/impl/ClusterAlertHistoryServiceImpl.java +++ b/datasophon-service/src/main/java/com/datasophon/api/service/impl/ClusterAlertHistoryServiceImpl.java @@ -52,15 +52,15 @@ public class ClusterAlertHistoryServiceImpl extends ServiceImpl implements ClusterAlertHistoryService { - + private static final Logger logger = LoggerFactory.getLogger(ClusterAlertHistoryServiceImpl.class); - + @Autowired private ClusterServiceRoleInstanceService roleInstanceService; - + @Autowired private ClusterInfoService clusterInfoService; - + @Override public void saveAlertHistory(String alertMessage) { logger.warn("Receive Alert Message : {}", alertMessage); @@ -71,7 +71,7 @@ public void saveAlertHistory(String alertMessage) { ActorUtils.actorSystem.dispatcher(), ActorRef.noSender()); } - + @Override public Result getAlertList(Integer serviceInstanceId) { List list = this.list(new QueryWrapper() @@ -80,7 +80,7 @@ public Result getAlertList(Integer serviceInstanceId) { .orderByDesc(Constants.CREATE_TIME)); return Result.success(list); } - + @Override public Result getAllAlertList(Integer clusterId, Integer page, Integer pageSize) { int offset = (page - 1) * pageSize; @@ -94,7 +94,7 @@ public Result getAllAlertList(Integer clusterId, Integer page, Integer pageSize) .eq(Constants.IS_ENABLED, 1)); return Result.success(list).put(Constants.TOTAL, count); } - + @Override public void removeAlertByRoleInstanceIds(List ids) { ClusterServiceRoleInstanceEntity roleInstanceEntity = roleInstanceService.getById(ids.get(0));