11d65810 张雷

perf(alarm): 优化报警记录查询性能

- 在处理报警记录时,增加了对树路径字段的非空判断
- 使用 ConvertUtils.isNotEmpty() 替代了原有的判断方式
- 优化了代码结构,减少了不必要的循环和字符串操作
1 个父辈 88172627
......@@ -80,6 +80,7 @@ public class AlarmCustomRecordHistoryServiceImpl extends ServiceImpl<AlarmRecord
List<AlarmRecordHistoryVO> recordList = pagelist.getRecords();
if(recordList!=null&&recordList.size()>0) {
for(AlarmRecordHistoryVO record : recordList) {
if(ConvertUtils.isNotEmpty(record.getAlarmCustomRuleTypeTreepath())){
String alarmCustomRuleTypeTreepath = record.getAlarmCustomRuleTypeTreepath();
String[] customRuleTypeArray = alarmCustomRuleTypeTreepath.split(",");
String customRuleTypeTreepathName = "";
......@@ -89,7 +90,8 @@ public class AlarmCustomRecordHistoryServiceImpl extends ServiceImpl<AlarmRecord
if(StringUtils.isNotEmpty(customRuleTypeTreepathName)) {
record.setAlarmCustomRuleTypeTreepathName(customRuleTypeTreepathName.substring(1));
}
}
if(ConvertUtils.isNotEmpty(record.getAlarmRuleTypeTreepath())){
String alarmRuleTypeTreepath = record.getAlarmRuleTypeTreepath();
String[] ruleTypeArray = alarmRuleTypeTreepath.split(",");
String alarmRuleTypeTreepathName = "";
......@@ -101,6 +103,7 @@ public class AlarmCustomRecordHistoryServiceImpl extends ServiceImpl<AlarmRecord
}
}
}
}
//添加流程信息
//获取流程实例id集合
Set<String> processInstanceIdSet = new HashSet<String>();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!