Authored by mlge

短信告警日志查询--修改

... ... @@ -35,8 +35,9 @@ public class MonitorAlarmServiceImpl {
String sql = "SHOW TAG VALUES FROM monitor_alarm WITH KEY = idc";
List<List<Object>> values = getResultList(influxdbName, sql);
List<String> typeList = new ArrayList<>();
typeList.add("all");
values.forEach(v -> typeList.add(v.get(1).toString()));
if(!CollectionUtils.isEmpty(values)){
values.forEach(v -> typeList.add(v.get(1).toString()));
}
return typeList;
}
... ... @@ -68,12 +69,7 @@ public class MonitorAlarmServiceImpl {
String querySql = "SELECT sms_content, info, send_status,type,idc FROM monitor_alarm WHERE event = 'alarm' ";
String countSql = "SELECT COUNT(sms_content) FROM monitor_alarm WHERE event = 'alarm' ";
StringBuilder conditionBuilder = new StringBuilder(" ");
if (CollectionUtils.isEmpty(idcList)) {
idcList = new ArrayList<>();
idcList.add("all");//默认所有
}
if (idcList.contains("all")) {
if (CollectionUtils.isEmpty(idcList)) {//默认查询所有的
conditionBuilder.append(" and type != 'work_system' ");
}else{
String s = "";
... ...