| | |
| | | </select> |
| | | |
| | | <select id="tree" resultMap="treeNodeResultMap"> |
| | | select id, parent_id, role_name as title, id as "value", id as "key" from blade_role where is_deleted = 0 AND id!=1123598816738675201 |
| | | select id, parent_id, role_name as title, id as "value", id as "key" from blade_role where is_deleted = 0 AND |
| | | id!=1123598816738675201 |
| | | <if test="param1!=null"> |
| | | and tenant_id = #{param1} |
| | | </if> |
| | |
| | | and is_deleted = 0 |
| | | </select> |
| | | |
| | | <!--角色查询--> |
| | | <select id="selectRole" resultType="java.util.HashMap"> |
| | | SELECT id,role_name AS title FROM blade_role WHERE is_deleted = 0 AND id != 1123598816738675201 |
| | | SELECT id, |
| | | role_name AS title |
| | | FROM blade_role |
| | | WHERE is_deleted = 0 |
| | | AND id != 1123598816738675201 |
| | | AND id != 1414575877054365698 |
| | | AND id != 1414840172333842433 |
| | | AND id != 1415870935329771522 |
| | | AND id != 1416733602219110402 |
| | | AND id != 1428177141018771458 |
| | | AND id != 1428972101748465665 |
| | | AND id != 1431234799414071297 |
| | | </select> |
| | | |
| | | <!--角色查询--> |
| | | <select id="getRoleList" resultType="org.springblade.modules.system.entity.Role"> |
| | | SELECT br.* FROM blade_role br |
| | | inner join ( |
| | | SELECT * FROM |
| | | ( |
| | | SELECT t1.*,IF( find_in_set( parent_id, @pids ) > 0, @pids := concat( @pids, ',', id ), 0 ) AS ischild FROM |
| | | ( SELECT id, parent_id,role_name,role_alias FROM blade_role t where is_deleted =0 ORDER BY parent_id, id ) t1, |
| | | ( SELECT @pids := #{roleParam.roleId} ) t2 |
| | | ) t3 |
| | | WHERE id != 1123598816738675201 and id != #{roleParam.roleId} |
| | | <if test="roleParam.roleName!=null and roleParam.roleName!=''"> |
| | | and role_name like concat('%',#{roleParam.roleName},'%') |
| | | </if> |
| | | <if test="roleParam.roleAlias!=null and roleParam.roleAlias!=''"> |
| | | and role_alias like concat('%',#{roleParam.roleAlias},'%') |
| | | </if> |
| | | ) t4 on br.id = t4.id |
| | | <if test="roleParam.isNowLevel==0"> |
| | | union all |
| | | ( |
| | | SELECT * FROM blade_role where id = #{roleParam.roleId} |
| | | ) |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |