Commit b12db346 by huangjy

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

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