Commit befb142a by huangjy

fix:告警列表

parent 21a5d771
......@@ -171,12 +171,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
.le(Objects.nonNull(param.getDealDateTo()), PlatAlarmRecord::getDealDate, param.getDealDateTo())
.in(CollectionUtils.isNotEmpty(orgIdList), PlatAlarmRecord::getOrgId, orgIdList)
.apply(StringUtils.isNotBlank(param.getNotifyUser()), "find_in_set('" + param.getNotifyUser() + "',notify_user)")
.and(CollectionUtils.isNotEmpty(param.getElderIdList()), qw -> {
List<String> elderIdList = param.getElderIdList();
for (String elderId : elderIdList) {
qw.or().apply("find_in_set('" + elderId + "',elder_ids)");
}
})
.in(CollectionUtils.isNotEmpty(param.getElderIdList()),PlatAlarmRecord::getElderIds,param.getElderIdList())
.eq(StringUtils.isNotBlank(param.getNoticeStatus()),PlatAlarmRecord::getNoticeStatus,param.getNoticeStatus())
.eq(StringUtils.isNotBlank(param.getReadFlag()),PlatAlarmRecord::getReadFlag,param.getReadFlag())
.orderByDesc(BaseEntity::getCreateDate)
......@@ -542,16 +537,14 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
@Override
public Integer unreadCount(PlatAlarmRecordQueryDTO dto) {
PlatElderChildrenInfo platElderChildrenInfo = platElderChildrenInfoService.getById(WechatUserUtil.getUserId());
List<PlatElderChildrenInfo> platElderChildrenInfoList = platElderChildrenInfoService.list(new QueryWrapper<PlatElderChildrenInfo>().lambda().eq(PlatElderChildrenInfo::getOpenid, platElderChildrenInfo)
.isNotNull(PlatElderChildrenInfo::getElderId));
log.info("子女端账号:"+platElderChildrenInfo.toString());
if (platElderChildrenInfo == null) {
return 0;
}
String elderId = platElderChildrenInfo.getElderId();
if(StringUtils.isBlank(elderId)){
if(CollectionUtils.isNotEmpty(platElderChildrenInfoList)){
return 0;
}
String[] split = elderId.split(",");
dto.setElderIdList(Arrays.asList(split));
List<String> elderIdList = platElderChildrenInfoList.stream().map(PlatElderChildrenInfo::getElderId).collect(Collectors.toList());
dto.setElderIdList(elderIdList);
dto.setNoticeStatus(CommonEnum.YES.getValue());
dto.setReadFlag(CommonEnum.NO.getValue());
LambdaQueryWrapper<PlatAlarmRecord> lambdaQueryWrapper = getLambdaQueryWrapper(dto);
......
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 sign in to comment