Commit 7a6ac271 authored by shaochangbin's avatar shaochangbin

修改告警查询排序。降序

parent a2742343
...@@ -122,6 +122,11 @@ public class Manager { ...@@ -122,6 +122,11 @@ public class Manager {
public Map<String, Object> getAlarmMsg() { public Map<String, Object> getAlarmMsg() {
Map<String,Object> map = new HashMap(); Map<String,Object> map = new HashMap();
List<AlarmMsg> alarmList = cassandraDao.getAlarmMsgList(); List<AlarmMsg> alarmList = cassandraDao.getAlarmMsgList();
if(alarmList != null && alarmList.size()>0){
//查询结果非空List降序排序(根据AlarmMsg::getAlatime)
alarmList = alarmList.stream().sorted(Comparator.comparing(AlarmMsg::getAlatime)).collect(Collectors.toList());
Collections.reverse(alarmList);
}
map.put("alarmMsg",alarmList); map.put("alarmMsg",alarmList);
return map; return map;
} }
......
...@@ -5,7 +5,8 @@ spring: ...@@ -5,7 +5,8 @@ spring:
cassandra: cassandra:
keyspace-name: ctid_prof keyspace-name: ctid_prof
# contact-points: 200.102.10.11 # contact-points: 200.102.10.11
contact-points: 121.22.111.251 # contact-points: 121.22.111.251
contact-points: 192.168.10.11
# port: 9042 # port: 9042
port: 9002 port: 9002
# username: gzt # username: gzt
...@@ -47,12 +48,16 @@ tokeTime: 1200000 ...@@ -47,12 +48,16 @@ tokeTime: 1200000
pointNumber: 60 pointNumber: 60
#微信告警 #微信告警
#应用代理ID #应用代理ID
agentId: 1000004 agentId: 123
#agentId: 1000004
#管理组凭证密钥 #管理组凭证密钥
corpsecret: 0gXvhsss corpsecret: 123
#corpsecret: 0gXvhsss
#corpsecret: 0gXvh18To60vLpw1wlPO4ncshvZjDKR0vaUuHAeDOb0 #corpsecret: 0gXvh18To60vLpw1wlPO4ncshvZjDKR0vaUuHAeDOb0
#wx告警地址 #wx告警地址
wxurl: hssss wxurl: 123
#wxurl: hssss
#wxurl: https://qyapi.weixin.qq.com/cgi-bin/gettoken #wxurl: https://qyapi.weixin.qq.com/cgi-bin/gettoken
#企业ID #企业ID
corpid: wwb8a34ddb02c87228 corpid: 123
#corpid: wwb8a34ddb02c87228
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