From cae3b043d8a8a08e176839d0c23a4432e5d9f5f4 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Thu, 14 Mar 2024 15:14:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml b/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
index c2d3332..728410d 100644
--- a/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
+++ b/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
@@ -34,6 +34,49 @@
<if test="rotation.regionCode!=null and rotation.regionCode!=''">
and jr.community_code like concat('%',#{rotation.regionCode},'%')
</if>
+ <if test="isAdministrator==2">
+ <choose>
+ <when test="rotation.roleName != null and rotation.roleName != ''">
+ <if test="rotation.roleName=='wgy'">
+ <choose>
+ <when test="gridCodeList !=null and gridCodeList !=''">
+ and jr.type = 2
+ and jr.community_code REGEXP #{gridCodeList}
+ </when>
+ <otherwise>
+ and jr.type = 2
+ and jr.community_code in ('')
+ </otherwise>
+ </choose>
+ </if>
+ <if test="rotation.roleName=='mj'">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList!=''">
+ and jr.type = 1
+ and jr.community_code REGEXP #{regionChildCodesList}
+ </when>
+ <otherwise>
+ and jr.type = 1
+ and jr.community_code in ('')
+ </otherwise>
+ </choose>
+ </if>
+ <if test="rotation.roleName=='inhabitant'">
+ and jr.type = 3
+ </if>
+ </when>
+ <otherwise>
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList!=''">
+ and jr.community_code REGEXP #{regionChildCodesList}
+ </when>
+ <otherwise>
+ and jr.community_code in ('')
+ </otherwise>
+ </choose>
+ </otherwise>
+ </choose>
+ </if>
</select>
--
Gitblit v1.9.3