From 1af3f0036d8a0ede8f97ecb2075bee43109a4977 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 23 Feb 2024 15:27:13 +0800
Subject: [PATCH] 场所记录查询过滤调整,binlog 解析调整
---
src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml | 61 ++++++++++++++++++++++++------
1 files changed, 49 insertions(+), 12 deletions(-)
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml b/src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
index b016394..a15befb 100644
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
+++ b/src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
@@ -73,22 +73,59 @@
<if test="place.isPerfect==2">
and jp.status = 2
</if>
- <if test="houseCodeList != null and houseCodeList.size()>0">
- and jp.house_code in
- <foreach collection="houseCodeList" item="houseCode" separator ="," open="(" close=")">
- #{houseCode}
- </foreach>
- </if>
<if test="isAdministrator==2">
<choose>
- <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
- and jg.grid_code in
- <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
- #{code}
- </foreach>
+ <when test="place.roleName != null and place.roleName != ''">
+ <if test="place.roleName=='wgy'">
+ <choose>
+ <when test="gridCodeList !=null and gridCodeList.size()>0">
+ and jp.grid_code in
+ <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </when>
+ <otherwise>
+ and jp.grid_code in ('')
+ </otherwise>
+ </choose>
+ </if>
+ <if test="place.roleName=='mj'">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and jpag.community_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </when>
+ <otherwise>
+ and jpag.community_code in ('')
+ </otherwise>
+ </choose>
+ </if>
</when>
<otherwise>
- and jg.grid_code in ('')
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and
+ (
+ jg.grid_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ or
+ jpag.community_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ )
+ </when>
+ <otherwise>
+ and
+ (
+ jg.grid_code in ('') or jpag.community_code in ('')
+ )
+ </otherwise>
+ </choose>
</otherwise>
</choose>
</if>
--
Gitblit v1.9.3