Bladeren bron

过滤返回角色管理内启用的,当前操作用户的本角色或下级角色

v_HuilingDeng 3 jaren geleden
bovenliggende
commit
f20fa16f93

+ 5 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/UserManagerService.java

@@ -32,7 +32,11 @@ public interface UserManagerService {
      */
     void updateUser(UpdateUserReq updateUserReq) throws Exception;
 
-
+    /**
+     *
+     * @return
+     * @throws Exception
+     */
     ListRoleTreeRes listRoleTree() throws Exception;
 
     /**

+ 3 - 2
abi-cloud-qr-platform-server/src/main/resources/dao/mapper/UserRoleMapper.xml

@@ -79,6 +79,7 @@
             <if test="role.roleLevel==5">
                 and r.l5_role_code=#{role.roleCode}
             </if>
+            and r.is_enable=1 and r.is_delete=0
         </where>
     </select>
 
@@ -119,7 +120,7 @@
             where role_code=#{roleCode}
         )
         and role_code != #{roleCode}
-        and is_enable=1 and is_delete=0
+        and is_enable=0 and is_delete=0
     </select>
 
     <!--查询启用中的下级角色-->
@@ -144,7 +145,7 @@
                 and l5_role_code=#{roleCode}
             </if>
         and role_code != #{roleCode}
-        and is_enable=0 and is_delete=0
+        and is_enable=1 and is_delete=0
     </select>
 
 </mapper>