From eb844e3260657b6bb9de03c1e5feca50bdf8190d Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 17 十一月 2021 13:50:58 +0800 Subject: [PATCH] fix 修复 OssFactory 在程序启动未调用api 没有初始化 导致无法订阅配置更改问题 --- ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml | 39 ++++++++++++++++++++++++++++++++++++--- 1 files changed, 36 insertions(+), 3 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index dca0ec0..94b161b 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -39,9 +39,40 @@ left join sys_dept d on u.dept_id = d.dept_id </sql> + <select id="selectPageRoleList" parameterType="SysRole" resultMap="SysRoleResult"> + <include refid="selectRoleVo"/> + where r.del_flag = '0' + <if test="role.roleId != null and role.roleId != 0"> + AND r.role_id = #{role.roleId} + </if> + <if test="role.roleName != null and role.roleName != ''"> + AND r.role_name like concat('%', #{role.roleName}, '%') + </if> + <if test="role.status != null and role.status != ''"> + AND r.status = #{role.status} + </if> + <if test="role.roleKey != null and role.roleKey != ''"> + AND r.role_key like concat('%', #{role.roleKey}, '%') + </if> + <if test="role.params.beginTime != null and role.params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� --> + and date_format(r.create_time,'%y%m%d') >= date_format(#{role.params.beginTime},'%y%m%d') + </if> + <if test="role.params.endTime != null and role.params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� --> + and date_format(r.create_time,'%y%m%d') <= date_format(#{role.params.endTime},'%y%m%d') + </if> + <!-- 鏁版嵁鑼冨洿杩囨护 --> + <if test="role.params.dataScope != null and role.params.dataScope != ''"> + AND ( ${role.params.dataScope} ) + </if> + order by r.role_sort + </select> + <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="roleName != null and roleName != ''"> AND r.role_name like concat('%', #{roleName}, '%') </if> @@ -58,7 +89,9 @@ and date_format(r.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') </if> <!-- 鏁版嵁鑼冨洿杩囨护 --> - ${params.dataScope} + <if test="params.dataScope != null and params.dataScope != ''"> + AND ( ${params.dataScope} ) + </if> order by r.role_sort </select> @@ -67,7 +100,7 @@ WHERE r.del_flag = '0' and ur.user_id = #{userId} </select> - <select id="selectRoleListByUserId" parameterType="Long" resultType="Integer"> + <select id="selectRoleListByUserId" parameterType="Long" resultType="Long"> select r.role_id from sys_role r left join sys_user_role ur on ur.role_id = r.role_id @@ -80,4 +113,4 @@ WHERE r.del_flag = '0' and u.user_name = #{userName} </select> -</mapper> \ No newline at end of file +</mapper> -- Gitblit v1.9.3