This commit is contained in:
2025-03-21 15:39:46 +08:00
parent 118c1a6ddf
commit c8edffdfd0
4 changed files with 23 additions and 18 deletions

View File

@ -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);
}

View File

@ -261,7 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN bgt_project_recruit as b on(b.id = a.recruit_id)
WHERE
a.user_id = #{userId}
and (a.status = "5" or a.status = "6")
and (a.status = "3" or a.status = "5" or a.status = "6")
and a.del_flag = "0"
GROUP BY a.recruit_id
</select>

View File

@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND a.message_small_type = #{req.smallType}
</if>
<if test="req.rq!=null">
DATE_FORMAT(a.create_time, '%Y-%m-%d') = #{req.rq} and
and DATE_FORMAT(a.create_time, '%Y-%m-%d') = #{req.rq}
</if>
</where>
order by a.create_time desc