告警确认调整

This commit is contained in:
tiger_zhou 2023-10-12 13:27:53 +08:00
parent 951d1727d8
commit 6614292617

View File

@ -128,7 +128,12 @@ public class AlertRecordService {
if (Objects.nonNull(id)) {
Optional<AlertTip> alertTipOptional = alertTips.stream().filter(d -> StringUtils.isNotEmpty(d.getTipTimeRef()))
.filter(d -> Splitter.on(StringPool.COMMA).splitToList(d.getTipTimeRef()).contains(id.toString())).findFirst();
return alertTipOptional.orElseGet(() -> alertTips.get(0));
if (alertTipOptional.isPresent()) {
return alertTipOptional.get();
} else {
alertTipOptional = alertTips.stream().filter(d -> StringUtils.isEmpty(d.getTipTimeRef())).findFirst();
return alertTipOptional.orElseGet(() -> alertTips.get(0));
}
} else {
return alertTips.get(0);
}