Forráskód Böngészése

代理人查询添加角色筛选

hxl13994548489 2 éve
szülő
commit
e39c3ec5a8

+ 8 - 1
src/main/resources/mapper/modules/admin/SysUserMapper.xml

@@ -1361,6 +1361,13 @@
             <if test="vo.managementSource != null  and  vo.managementSource!='' ">
                 AND sd.management_source =#{vo.managementSource}
             </if>
+            <choose>
+                <when  test='vo.managementSource == "2"'>
+                   and (sur.role_id = 20  or  sur.role_id = 21)
+                </when>
+                <otherwise>
+                </otherwise>
+            </choose>
             <if test="vo.provinceId != null and vo.provinceId != ''">
                 and sd.id like  concat('%',#{vo.provinceId},'%')
             </if>
@@ -1382,7 +1389,6 @@
             <if test="vo.phoneNumber != null and vo.phoneNumber != ''">
                 and su.mobile   =#{vo.phoneNumber}
             </if>
-
             <if test="vo.leaderId != null and vo.leaderId != ''">
                 and su.leader_id   =#{vo.leaderId}
             </if>
@@ -1445,6 +1451,7 @@
             su.id  LIKE '%M%'
             and su.status = '1'
             AND sd.management_source =2
+            and (sur.role_id = 20  or  sur.role_id = 21)
             <if test="vo.provinceId != null and vo.provinceId != ''">
                 and sd.id like  concat('%',#{vo.provinceId},'%')
             </if>