From fa671bd9f95e220eb0285ec2374726983bc381ad Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 14 Mar 2024 11:47:33 +0800
Subject: [PATCH] 轮播图查询调整
---
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