|
@@ -59,7 +59,7 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
- <select id="listRoleTree" resultType="com.abi.qms.platform.dao.entity.UserRole">
|
|
|
+ <select id="listRoleTreeEnable" resultType="com.abi.qms.platform.dao.entity.UserRole">
|
|
|
select r.*
|
|
|
from user_role r
|
|
|
<where>
|
|
@@ -83,6 +83,30 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="listRoleTree" resultType="com.abi.qms.platform.dao.entity.UserRole">
|
|
|
+ select r.*
|
|
|
+ from user_role r
|
|
|
+ <where>
|
|
|
+ <!-- 仅可以查看当前角色树下的角色 -->
|
|
|
+ <if test="role.roleLevel==1">
|
|
|
+ and r.l1_role_code=#{role.roleCode}
|
|
|
+ </if>
|
|
|
+ <if test="role.roleLevel==2">
|
|
|
+ and r.l2_role_code=#{role.roleCode}
|
|
|
+ </if>
|
|
|
+ <if test="role.roleLevel==3">
|
|
|
+ and r.l3_role_code=#{role.roleCode}
|
|
|
+ </if>
|
|
|
+ <if test="role.roleLevel==4">
|
|
|
+ and r.l4_role_code=#{role.roleCode}
|
|
|
+ </if>
|
|
|
+ <if test="role.roleLevel==5">
|
|
|
+ and r.l5_role_code=#{role.roleCode}
|
|
|
+ </if>
|
|
|
+ and r.is_delete=0
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="countList" resultType="long">
|
|
|
select IFNULL(count(distinct user_id),0) as user_count
|
|
|
from user_mapping_info_role
|