|
@@ -31,33 +31,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
|
|
|
- <include refid="selectRoleVo"/>
|
|
|
- where r.del_flag = '0'
|
|
|
- <if test="roleId != null and roleId != 0">
|
|
|
- AND r.role_id = #{roleId}
|
|
|
- </if>
|
|
|
- <if test="tenantId != null and tenantId != ''">
|
|
|
- AND r.tenant_id = #{tenantId}
|
|
|
- </if>
|
|
|
- <if test="roleName != null and roleName != ''">
|
|
|
- AND r.role_name like concat('%', #{roleName}, '%')
|
|
|
- </if>
|
|
|
- <if test="status != null and status != ''">
|
|
|
- AND r.status = #{status}
|
|
|
- </if>
|
|
|
- <if test="roleKey != null and roleKey != ''">
|
|
|
- AND r.role_key like concat('%', #{roleKey}, '%')
|
|
|
- </if>
|
|
|
- <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
|
|
- and date_format(r.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
- </if>
|
|
|
- <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
|
- and date_format(r.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
- </if>
|
|
|
- <!-- 数据范围过滤 -->
|
|
|
- ${params.dataScope}
|
|
|
- order by r.role_sort
|
|
|
- </select>
|
|
|
+ <include refid="selectRoleVo"/>
|
|
|
+ where r.del_flag = '0'
|
|
|
+ <if test="roleId != null and roleId != 0">
|
|
|
+ AND r.role_id = #{roleId}
|
|
|
+ </if>
|
|
|
+ <if test="tenantId != null and tenantId != ''">
|
|
|
+ AND r.tenant_id = #{tenantId}
|
|
|
+ </if>
|
|
|
+ <if test="roleName != null and roleName != ''">
|
|
|
+ AND r.role_name like concat('%', #{roleName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ AND r.status = #{status}
|
|
|
+ </if>
|
|
|
+ <if test="roleKey != null and roleKey != ''">
|
|
|
+ AND r.role_key like concat('%', #{roleKey}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
|
|
+ and date_format(r.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
+ <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
|
+ and date_format(r.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
+ <if test="keyword neq null and keyword neq ''">
|
|
|
+ and (instr(r.role_key,#{keyword}) or instr(r.role_name,#{keyword}))
|
|
|
+ </if>
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ ${params.dataScope}
|
|
|
+ order by r.role_sort
|
|
|
+ </select>
|
|
|
|
|
|
<select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
|
|
|
<include refid="selectRoleVo"/>
|