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

@ -203,7 +203,7 @@
*/ */
@ApiOperation("【我的】【岗前培训】分数查询") @ApiOperation("【我的】【岗前培训】分数查询")
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userScoreQuery')") //@PreAuthorize("@ss.hasPermi('wgzApp:user:userScoreQuery')")
@PostMapping("/WgzUserScoreQuery") @GetMapping("/WgzUserScoreQuery")
public AjaxResult<WgzAppUserScoreQuery> userScoreQuery() { public AjaxResult<WgzAppUserScoreQuery> userScoreQuery() {
Long appUserId = SecurityUtils.getAppUserId(); Long appUserId = SecurityUtils.getAppUserId();
return AjaxResult.success(iWgzQuestionSaveService.userScoreQuery(appUserId)); return AjaxResult.success(iWgzQuestionSaveService.userScoreQuery(appUserId));

View File

@ -159,14 +159,17 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
zgIds.add(zg.getRecruitId()); zgIds.add(zg.getRecruitId());
} }
List<Long> zgUserIds = new ArrayList<>(); List<Long> zgUserIds = new ArrayList<>();
List<BgtProjectRecruit> appByIdList = iBgtProjectRecruitService.list( if (!zgIds.isEmpty()){
new LambdaQueryWrapper<BgtProjectRecruit>(). List<BgtProjectRecruit> appByIdList = iBgtProjectRecruitService.list(
in(BgtProjectRecruit::getId, zgIds) new LambdaQueryWrapper<BgtProjectRecruit>().
); in(BgtProjectRecruit::getId, zgIds)
for (BgtProjectRecruit appById : appByIdList) { );
zgUserIds.add(appById.getUserId()); for (BgtProjectRecruit appById : appByIdList) {
zgUserIds.add(appById.getUserId());
}
} }
WgzAppMessageTypeStatisticsRes res = new WgzAppMessageTypeStatisticsRes(); WgzAppMessageTypeStatisticsRes res = new WgzAppMessageTypeStatisticsRes();
Map<String, Integer> mp = new HashMap<>(); Map<String, Integer> mp = new HashMap<>();
//1、获取字典类型 //1、获取字典类型
@ -181,15 +184,17 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
mp.put(datum.getDictValue(),baseMapper.selectCount(wp)); mp.put(datum.getDictValue(),baseMapper.selectCount(wp));
} }
//2、单独获取待办中的消息 //2、单独获取待办中的消息
Integer daiBanCount = baseMapper.selectCount( if (!zgUserIds.isEmpty()){
new LambdaQueryWrapper<WgzMessage>(). Integer daiBanCount = baseMapper.selectCount(
eq(WgzMessage::getSenderType, USERTYPE_BGT). new LambdaQueryWrapper<WgzMessage>().
in(WgzMessage::getSenderId, zgUserIds). eq(WgzMessage::getSenderType, USERTYPE_BGT).
eq(WgzMessage::getRecipientType, USERTYPE_WGZ). in(WgzMessage::getSenderId, zgUserIds).
eq(WgzMessage::getRecipientId, appUserId). eq(WgzMessage::getRecipientType, USERTYPE_WGZ).
eq(WgzMessage::getIsOperation, "1") eq(WgzMessage::getRecipientId, appUserId).
); eq(WgzMessage::getIsOperation, "1")
mp.put("3",daiBanCount); );
mp.put("3",daiBanCount);
}
return res.setMp(mp); 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) LEFT JOIN bgt_project_recruit as b on(b.id = a.recruit_id)
WHERE WHERE
a.user_id = #{userId} 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" and a.del_flag = "0"
GROUP BY a.recruit_id GROUP BY a.recruit_id
</select> </select>

View File

@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND a.message_small_type = #{req.smallType} AND a.message_small_type = #{req.smallType}
</if> </if>
<if test="req.rq!=null"> <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> </if>
</where> </where>
order by a.create_time desc order by a.create_time desc