From a93cecfb49c06cd39f363bc6202a8779ab15b06e Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期一, 26 十二月 2022 17:16:17 +0800
Subject: [PATCH] fix: 工作台群消息
---
src/main/resources/mapper/ReportDao.xml | 49 ++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 40 insertions(+), 9 deletions(-)
diff --git a/src/main/resources/mapper/ReportDao.xml b/src/main/resources/mapper/ReportDao.xml
index 9242398..d83adb9 100644
--- a/src/main/resources/mapper/ReportDao.xml
+++ b/src/main/resources/mapper/ReportDao.xml
@@ -12,7 +12,7 @@
and (u.real_name like '%${reportParamDto.people}%' or u.user_idcard like '%${reportParamDto.people}%')
</if>
<if test="reportParamDto.phoneNumber != ''">
- and u.user_mobile = ${reportParamDto.phoneNumber}
+ and u.user_mobile like '%${reportParamDto.phoneNumber}%'
</if>
<if test="reportParamDto.havaMaterial != ''">
<if test="reportParamDto.havaMaterial == 1">
@@ -22,10 +22,12 @@
and r.report_materials is null
</if>
</if>
- <if test="reportParamDto.isInGroup != ''">
- and r.status = ${reportParamDto.isInGroup}
+ <if test="reportParamDto.isInGroup != null">
+ and r.is_in_group = ${reportParamDto.isInGroup}
</if>
+ and r.status = 0
</where>
+ order by r.ctime DESC
</select>
<select id="getReportListVoById" resultType="com.example.jz.modle.vo.ReportListVo">
select u.user_mobile mobile, u.user_idcard idcard, u.real_name reporterName, r.*
@@ -37,16 +39,18 @@
select u.user_mobile mobile,u.user_idcard idcard,u.real_name reporterName,r.*
from report r
join user u on r.user_id = u.id
- join group_user gu on gu.user_id = u.id
<where>
1=1
<if test="reportParamDto.people != ''">
and (u.real_name like '%${reportParamDto.people}%' or u.user_idcard like '%${reportParamDto.people}%')
</if>
<if test="reportParamDto.phoneNumber != ''">
- and u.user_mobile = ${reportParamDto.phoneNumber}
+ and u.user_mobile like '%${reportParamDto.phoneNumber}%'
</if>
- <if test="reportParamDto.havaMaterial != ''">
+ <if test="reportParamDto.isInGroup != null">
+ and r.is_in_group = ${reportParamDto.isInGroup}
+ </if>
+ <if test="reportParamDto.havaMaterial !=null">
<if test="reportParamDto.havaMaterial == 1">
and r.report_materials is not null
</if>
@@ -54,10 +58,37 @@
and r.report_materials is null
</if>
</if>
- <if test="reportParamDto.isInGroup != ''">
- and r.status = ${reportParamDto.isInGroup}
+ </where>
+ and r.cause_id = #{causeId} order by r.ctime DESC limit #{size},#{current}
+ </select>
+
+ <select id="getPageByGroupIdCount" resultType="Integer">
+select count(1) from (
+ select u.user_mobile mobile,u.user_idcard idcard,u.real_name reporterName,r.*
+ from report r
+ join user u on r.user_id = u.id
+ <where>
+ 1=1
+ <if test="reportParamDto.people != ''">
+ and (u.real_name like '%${reportParamDto.people}%' or u.user_idcard like '%${reportParamDto.people}%')
+ </if>
+ <if test="reportParamDto.phoneNumber != ''">
+ and u.user_mobile like '%${reportParamDto.phoneNumber}%'
+ </if>
+ <if test="reportParamDto.isInGroup != null">
+ and r.is_in_group = ${reportParamDto.isInGroup}
+ </if>
+ <if test="reportParamDto.havaMaterial !=null">
+ <if test="reportParamDto.havaMaterial == 1">
+ and r.report_materials is not null
+ </if>
+ <if test="reportParamDto.havaMaterial == 0">
+ and r.report_materials is null
+ </if>
</if>
</where>
- and gu.group_id = #{groupId}
+ and r.cause_id = #{causeId}
+ ) as reporter
</select>
+
</mapper>
--
Gitblit v1.8.0