From c8edffdfd086736651002d72d57ea18f9a2a6de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=88=90?= <2847920761@qq.com> Date: Fri, 21 Mar 2025 15:39:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wgz/controller/WgzAppController.java | 2 +- .../service/impl/WgzMessageServiceImpl.java | 35 +++++++++++-------- .../bgt/BgtProjectRecruitApplyMapper.xml | 2 +- .../resources/mapper/wgz/WgzMessageMapper.xml | 2 +- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wgz/controller/WgzAppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wgz/controller/WgzAppController.java index f0661d7..753b786 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wgz/controller/WgzAppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wgz/controller/WgzAppController.java @@ -203,7 +203,7 @@ */ @ApiOperation("【我的】【岗前培训】分数查询") //@PreAuthorize("@ss.hasPermi('wgzApp:user:userScoreQuery')") - @PostMapping("/WgzUserScoreQuery") + @GetMapping("/WgzUserScoreQuery") public AjaxResult userScoreQuery() { Long appUserId = SecurityUtils.getAppUserId(); return AjaxResult.success(iWgzQuestionSaveService.userScoreQuery(appUserId)); diff --git a/ruoyi-system/src/main/java/com/ruoyi/wgz/service/impl/WgzMessageServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wgz/service/impl/WgzMessageServiceImpl.java index b358059..a67737f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wgz/service/impl/WgzMessageServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wgz/service/impl/WgzMessageServiceImpl.java @@ -159,14 +159,17 @@ public class WgzMessageServiceImpl extends ServicePlusImpl zgUserIds = new ArrayList<>(); - List appByIdList = iBgtProjectRecruitService.list( - new LambdaQueryWrapper(). - in(BgtProjectRecruit::getId, zgIds) - ); - for (BgtProjectRecruit appById : appByIdList) { - zgUserIds.add(appById.getUserId()); + if (!zgIds.isEmpty()){ + List appByIdList = iBgtProjectRecruitService.list( + new LambdaQueryWrapper(). + in(BgtProjectRecruit::getId, zgIds) + ); + for (BgtProjectRecruit appById : appByIdList) { + zgUserIds.add(appById.getUserId()); + } } + WgzAppMessageTypeStatisticsRes res = new WgzAppMessageTypeStatisticsRes(); Map mp = new HashMap<>(); //1、获取字典类型 @@ -181,15 +184,17 @@ public class WgzMessageServiceImpl extends ServicePlusImpl(). - 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(). + 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); } diff --git a/ruoyi-system/src/main/resources/mapper/bgt/BgtProjectRecruitApplyMapper.xml b/ruoyi-system/src/main/resources/mapper/bgt/BgtProjectRecruitApplyMapper.xml index ac77f6a..901dfd4 100644 --- a/ruoyi-system/src/main/resources/mapper/bgt/BgtProjectRecruitApplyMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/bgt/BgtProjectRecruitApplyMapper.xml @@ -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 diff --git a/ruoyi-system/src/main/resources/mapper/wgz/WgzMessageMapper.xml b/ruoyi-system/src/main/resources/mapper/wgz/WgzMessageMapper.xml index cc1ebde..cd77875 100644 --- a/ruoyi-system/src/main/resources/mapper/wgz/WgzMessageMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wgz/WgzMessageMapper.xml @@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND a.message_small_type = #{req.smallType} - DATE_FORMAT(a.create_time, '%Y-%m-%d') = #{req.rq} and + and DATE_FORMAT(a.create_time, '%Y-%m-%d') = #{req.rq} order by a.create_time desc