fix: 告警电话记录和报警记录,新增告警标题查询条件。

This commit is contained in:
tianyongbao
2026-05-06 22:50:00 +08:00
parent b97194c5b5
commit 5d5beff9a2
2 changed files with 9 additions and 2 deletions

View File

@@ -171,6 +171,12 @@ public class CallNoticeServiceImpl implements ICallNoticeService {
wrapper.apply("mw.warn_type = {0}", warnType);
}
// 处理告警标题模糊查询
String warnTitle = (String) params.get("warnTitle");
if (StringUtils.isNotBlank(warnTitle)) {
wrapper.like("mw.title", warnTitle);
}
// 处理告警ID精确查询
Object messageWarnIdObj = params.get("messageWarnId");
if (messageWarnIdObj != null) {

View File

@@ -109,6 +109,7 @@ public class MessageWarnServiceImpl implements IMessageWarnService {
.eq(bo.getDeviceId() != null, MessageWarn::getDeviceId, bo.getDeviceId())
.eq(StringUtils.isNotBlank(bo.getTitle()), MessageWarn::getTitle, bo.getTitle())
.eq(StringUtils.isNotBlank(bo.getMessage()), MessageWarn::getMessage, bo.getMessage())
.like(StringUtils.isNotBlank(bo.getTitle()), MessageWarn::getTitle, bo.getTitle())
.eq(bo.getIsRead() != null, MessageWarn::getIsRead, bo.getIsRead())
.eq(bo.getWarnType() != null, MessageWarn::getWarnType, bo.getWarnType())
.like(StringUtils.isNotBlank(bo.getPondName()), MessageWarn::getPondName, bo.getPondName())
@@ -224,11 +225,11 @@ public class MessageWarnServiceImpl implements IMessageWarnService {
public Boolean readAllMessages(Long userId) {
MessageWarn update = new MessageWarn();
update.setIsRead(1);
LambdaQueryWrapper<MessageWarn> wrapper = Wrappers.lambdaQuery(MessageWarn.class)
.eq(MessageWarn::getUserId, userId)
.eq(MessageWarn::getIsRead, 0);
return baseMapper.update(update, wrapper) > 0;
}
}