From 4959ba9c02656261b35eb0e9c647186505204f00 Mon Sep 17 00:00:00 2001 From: weizhiqiang <> Date: Wed, 20 Jul 2022 12:08:11 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=AE=BA=E5=9D=9B=E3=80=91=E4=B8=BE?= =?UTF-8?q?=E6=8A=A5=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../skyeye/eve/service/impl/ForumReportServiceImpl.java | 7 +++++++ .../main/resources/mapper/forum/ForumReportMapper.xml | 9 +++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/skyeye-promote/skyeye-forum/src/main/java/com/skyeye/eve/service/impl/ForumReportServiceImpl.java b/skyeye-promote/skyeye-forum/src/main/java/com/skyeye/eve/service/impl/ForumReportServiceImpl.java index 390e6908..98ca41bd 100644 --- a/skyeye-promote/skyeye-forum/src/main/java/com/skyeye/eve/service/impl/ForumReportServiceImpl.java +++ b/skyeye-promote/skyeye-forum/src/main/java/com/skyeye/eve/service/impl/ForumReportServiceImpl.java @@ -12,6 +12,7 @@ import com.skyeye.common.util.DateUtil; import com.skyeye.common.util.ToolUtil; import com.skyeye.eve.dao.ForumReportDao; import com.skyeye.eve.service.ForumReportService; +import com.skyeye.eve.service.SysDictDataService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -34,6 +35,9 @@ public class ForumReportServiceImpl implements ForumReportService { @Autowired private ForumReportDao forumReportDao; + @Autowired + private SysDictDataService sysDictDataService; + /** * 新增举报信息 * @@ -63,6 +67,7 @@ public class ForumReportServiceImpl implements ForumReportService { Map map = inputObject.getParams(); Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString())); List> beans = forumReportDao.queryReportNoCheckList(map); + sysDictDataService.getDictDataNameByIdList(beans, "reportTypeId", "reportType"); outputObject.setBeans(beans); outputObject.settotal(pages.getTotal()); } @@ -130,6 +135,7 @@ public class ForumReportServiceImpl implements ForumReportService { Map map = inputObject.getParams(); Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString())); List> beans = forumReportDao.queryReportCheckedList(map); + sysDictDataService.getDictDataNameByIdList(beans, "reportTypeId", "reportType"); outputObject.setBeans(beans); outputObject.settotal(pages.getTotal()); } @@ -144,6 +150,7 @@ public class ForumReportServiceImpl implements ForumReportService { public void queryForumReportMationToDetails(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map bean = forumReportDao.queryForumReportMationToDetails(map); + sysDictDataService.getDictDataNameByIdBean(bean, "reportTypeId", "reportType"); outputObject.setBean(bean); outputObject.settotal(1); } diff --git a/skyeye-promote/skyeye-forum/src/main/resources/mapper/forum/ForumReportMapper.xml b/skyeye-promote/skyeye-forum/src/main/resources/mapper/forum/ForumReportMapper.xml index 53b776ee..6fd30bf4 100644 --- a/skyeye-promote/skyeye-forum/src/main/resources/mapper/forum/ForumReportMapper.xml +++ b/skyeye-promote/skyeye-forum/src/main/resources/mapper/forum/ForumReportMapper.xml @@ -13,7 +13,7 @@ a.id, d.forum_title title, d.id forumId, - CASE WHEN a.report_type_id = 'other' THEN '其他' ELSE c.type_name END as reportType, + a.report_type_id reportTypeId, a.examine_state examineState, a.report_other_content reportContent, a.report_desc reportDesc, @@ -22,7 +22,6 @@ FROM forum_report a LEFT JOIN sys_eve_user_staff b ON a.report_id = b.user_id - LEFT JOIN forum_report_type c ON a.report_type_id = c.id LEFT JOIN forum_content d ON a.forum_id = d.id WHERE a.examine_state = '1' @@ -59,7 +58,7 @@ a.id, e.forum_title title, e.id forumId, - CASE WHEN a.report_type_id = 'other' THEN '其他' ELSE c.type_name END as reportType, + a.report_type_id reportTypeId, a.examine_state examineState, a.report_other_content reportContent, a.report_desc reportDesc, @@ -71,7 +70,6 @@ FROM forum_report a LEFT JOIN sys_eve_user_staff b ON a.report_id = b.user_id - LEFT JOIN forum_report_type c ON a.report_type_id = c.id LEFT JOIN sys_eve_user_staff d ON a.examine_id = d.user_id LEFT JOIN forum_content e ON a.forum_id = e.id WHERE (a.examine_state = '2' OR a.examine_state = '3') @@ -94,7 +92,7 @@ SELECT a.id, e.forum_title title, - CASE WHEN a.report_type_id = 'other' THEN '其他' ELSE c.type_name END as reportType, + a.report_type_id reportTypeId, CASE a.examine_state WHEN '1' THEN '未审核' WHEN '2' THEN '审核通过' WHEN '3' THEN '审核不通过' END examineState, a.report_other_content reportContent, a.report_desc reportDesc, @@ -106,7 +104,6 @@ FROM forum_report a LEFT JOIN sys_eve_user_staff b ON a.report_id = b.user_id - LEFT JOIN forum_report_type c ON a.report_type_id = c.id LEFT JOIN sys_eve_user_staff d ON a.examine_id = d.user_id LEFT JOIN forum_content e ON a.forum_id = e.id WHERE a.id = #{id}