优化
This commit is contained in:
@ -203,7 +203,7 @@
|
||||
*/
|
||||
@ApiOperation("【我的】【岗前培训】分数查询")
|
||||
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userScoreQuery')")
|
||||
@PostMapping("/WgzUserScoreQuery")
|
||||
@GetMapping("/WgzUserScoreQuery")
|
||||
public AjaxResult<WgzAppUserScoreQuery> userScoreQuery() {
|
||||
Long appUserId = SecurityUtils.getAppUserId();
|
||||
return AjaxResult.success(iWgzQuestionSaveService.userScoreQuery(appUserId));
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user