Commit 7a6ac271 authored by shaochangbin's avatar shaochangbin

修改告警查询排序。降序

parent a2742343
......@@ -122,6 +122,11 @@ public class Manager {
public Map<String, Object> getAlarmMsg() {
Map<String,Object> map = new HashMap();
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);
return map;
}
......
......@@ -5,7 +5,8 @@ spring:
cassandra:
keyspace-name: ctid_prof
# 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: 9002
# username: gzt
......@@ -47,12 +48,16 @@ tokeTime: 1200000
pointNumber: 60
#微信告警
#应用代理ID
agentId: 1000004
agentId: 123
#agentId: 1000004
#管理组凭证密钥
corpsecret: 0gXvhsss
corpsecret: 123
#corpsecret: 0gXvhsss
#corpsecret: 0gXvh18To60vLpw1wlPO4ncshvZjDKR0vaUuHAeDOb0
#wx告警地址
wxurl: hssss
wxurl: 123
#wxurl: hssss
#wxurl: https://qyapi.weixin.qq.com/cgi-bin/gettoken
#企业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