From 5f0481c0676f03586db080a0f80448624ad0b8c9 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期五, 18 三月 2022 01:53:38 +0800
Subject: [PATCH] !157 修复执行"查询当前数据库类型"后未关闭数据库链接,导致当前连接池中活跃连接数达到最大连接数的bug Merge pull request !157 from KonBAI/close_dataSource_conn

---
 ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml |   46 ++++------------------------------------------
 1 files changed, 4 insertions(+), 42 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
index 15f94f3..dc54c7e 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -39,52 +39,14 @@
                  left join sys_dept d on u.dept_id = d.dept_id
     </sql>
 
-    <select id="selectPageRoleList" parameterType="SysRole" resultMap="SysRoleResult">
+    <select id="selectPageRoleList" 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') &gt;= 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') &lt;= date_format(#{role.params.endTime},'%y%m%d')
-        </if>
-        order by r.role_sort
+        ${ew.getCustomSqlSegment}
     </select>
 
-    <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
+    <select id="selectRoleList" 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>
-        <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') &gt;= 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') &lt;= date_format(#{params.endTime},'%y%m%d')
-        </if>
-        order by r.role_sort
+        ${ew.getCustomSqlSegment}
     </select>
 
     <select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">

--
Gitblit v1.9.3