优化
This commit is contained in:
@ -159,14 +159,17 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
|
||||
zgIds.add(zg.getRecruitId());
|
||||
}
|
||||
List<Long> zgUserIds = new ArrayList<>();
|
||||
List<BgtProjectRecruit> appByIdList = iBgtProjectRecruitService.list(
|
||||
new LambdaQueryWrapper<BgtProjectRecruit>().
|
||||
in(BgtProjectRecruit::getId, zgIds)
|
||||
);
|
||||
for (BgtProjectRecruit appById : appByIdList) {
|
||||
zgUserIds.add(appById.getUserId());
|
||||
if (!zgIds.isEmpty()){
|
||||
List<BgtProjectRecruit> appByIdList = iBgtProjectRecruitService.list(
|
||||
new LambdaQueryWrapper<BgtProjectRecruit>().
|
||||
in(BgtProjectRecruit::getId, zgIds)
|
||||
);
|
||||
for (BgtProjectRecruit appById : appByIdList) {
|
||||
zgUserIds.add(appById.getUserId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
WgzAppMessageTypeStatisticsRes res = new WgzAppMessageTypeStatisticsRes();
|
||||
Map<String, Integer> mp = new HashMap<>();
|
||||
//1、获取字典类型
|
||||
@ -181,15 +184,17 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
|
||||
mp.put(datum.getDictValue(),baseMapper.selectCount(wp));
|
||||
}
|
||||
//2、单独获取待办中的消息
|
||||
Integer daiBanCount = baseMapper.selectCount(
|
||||
new LambdaQueryWrapper<WgzMessage>().
|
||||
eq(WgzMessage::getSenderType, USERTYPE_BGT).
|
||||
in(WgzMessage::getSenderId, zgUserIds).
|
||||
eq(WgzMessage::getRecipientType, USERTYPE_WGZ).
|
||||
eq(WgzMessage::getRecipientId, appUserId).
|
||||
eq(WgzMessage::getIsOperation, "1")
|
||||
);
|
||||
mp.put("3",daiBanCount);
|
||||
if (!zgUserIds.isEmpty()){
|
||||
Integer daiBanCount = baseMapper.selectCount(
|
||||
new LambdaQueryWrapper<WgzMessage>().
|
||||
eq(WgzMessage::getSenderType, USERTYPE_BGT).
|
||||
in(WgzMessage::getSenderId, zgUserIds).
|
||||
eq(WgzMessage::getRecipientType, USERTYPE_WGZ).
|
||||
eq(WgzMessage::getRecipientId, appUserId).
|
||||
eq(WgzMessage::getIsOperation, "1")
|
||||
);
|
||||
mp.put("3",daiBanCount);
|
||||
}
|
||||
return res.setMp(mp);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user