From 88de0b5169112f8ea908cc2c048bc34286f8851d Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Mon, 26 Feb 2024 13:12:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
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