Commit b12db346 by huangjy

fix:子女段告警列表问题修复

parent 1e1acd65
......@@ -123,10 +123,8 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
@Override
public PageVO<PlatAlarmRecordVO> childrenPage(PageReqDTO<PlatAlarmRecordQueryDTO> dto) {
PlatElderChildrenInfo platElderChildrenInfo = platElderChildrenInfoService.getById(WechatUserUtil.getUserId());
List<PlatElderChildrenInfo> platElderChildrenInfoList = platElderChildrenInfoService.list(new QueryWrapper<PlatElderChildrenInfo>().lambda().eq(PlatElderChildrenInfo::getOpenid, platElderChildrenInfo.getOpenid())
.isNotNull(PlatElderChildrenInfo::getElderId));
log.info("子女端账号:"+platElderChildrenInfo.toString());
String elderId = platElderChildrenInfo.getElderId();
List<PlatElderChildrenInfo> platElderChildrenInfoList = getPlatElderChildrenInfosByOpenid(platElderChildrenInfo.getOpenid());
log.info("子女端账号:{}",JSON.toJSONString(platElderChildrenInfo));
if(CollectionUtils.isNotEmpty(platElderChildrenInfoList)){
return new PageVO<>();
}
......@@ -537,9 +535,8 @@ 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());
List<PlatElderChildrenInfo> platElderChildrenInfoList = getPlatElderChildrenInfosByOpenid(platElderChildrenInfo.getOpenid());
log.info("子女端账号:{}",JSON.toJSONString(platElderChildrenInfo));
if(CollectionUtils.isNotEmpty(platElderChildrenInfoList)){
return 0;
}
......@@ -551,6 +548,11 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
return Math.toIntExact(count(lambdaQueryWrapper));
}
private List<PlatElderChildrenInfo> getPlatElderChildrenInfosByOpenid(String openid) {
return platElderChildrenInfoService.list(new QueryWrapper<PlatElderChildrenInfo>().lambda().eq(PlatElderChildrenInfo::getOpenid, openid)
.isNotNull(PlatElderChildrenInfo::getElderId));
}
@Override
@Transactional(rollbackFor = Exception.class)
public void misinformation(String id) {
......
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