From 5d8d6211c77edc6d07d1a3f847904dd30a8b3447 Mon Sep 17 00:00:00 2001 From: fangyuan <527392886@qq.com> Date: 星期四, 16 二月 2023 09:32:45 +0800 Subject: [PATCH] 案件bug修复及优化 --- src/main/resources/mapper/ReportDao.xml | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mapper/ReportDao.xml b/src/main/resources/mapper/ReportDao.xml index a11e47b..d3845e6 100644 --- a/src/main/resources/mapper/ReportDao.xml +++ b/src/main/resources/mapper/ReportDao.xml @@ -19,12 +19,13 @@ and r.report_materials is not null </if> <if test="reportParamDto.havaMaterial == 0"> - and r.report_materials is null + and (r.report_materials is null or r.report_materials='') </if> </if> <if test="reportParamDto.isInGroup != null"> and r.is_in_group = ${reportParamDto.isInGroup} </if> + and r.status = 0 </where> order by r.ctime DESC </select> @@ -90,4 +91,15 @@ ) as reporter </select> + <select id="selectListGroup" resultType="com.example.jz.modle.entity.Report"> + SELECT + t1.* + FROM + report t1 + LEFT JOIN group_user t2 ON t1.id = t2.user_id + where t1.user_id=#{id} + GROUP BY + t2.group_id + </select> + </mapper> -- Gitblit v1.8.0