From 410e73ecfe28f4794dfd3e48a3372bff1ba33c70 Mon Sep 17 00:00:00 2001
From: huangjiayang <5265313@qq.com>
Date: 星期三, 14 五月 2025 11:18:31 +0800
Subject: [PATCH] 【UPDATE】修改系统管理相关基础功能模糊检索报错问题

---
 aps-modules/aps-system/src/main/resources/mapper/system/SysDictDataMapper.xml   |    2 +-
 aps-modules/aps-system/src/main/resources/mapper/system/SysDictTypeMapper.xml   |    4 ++--
 aps-modules/aps-system/src/main/resources/mapper/system/SysOperLogMapper.xml    |    6 +++---
 aps-modules/aps-system/src/main/resources/mapper/system/SysNoticeMapper.xml     |    4 ++--
 aps-modules/aps-system/src/main/resources/mapper/system/SysConfigMapper.xml     |    4 ++--
 aps-modules/aps-system/src/main/resources/mapper/system/SysMenuMapper.xml       |    4 ++--
 aps-modules/aps-system/src/main/resources/mapper/system/SysLogininforMapper.xml |    4 ++--
 aps-modules/aps-system/src/main/resources/mapper/system/SysPostMapper.xml       |    4 ++--
 aps-modules/aps-system/src/main/resources/mapper/system/SysRoleMapper.xml       |    4 ++--
 aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml       |    2 +-
 aps-modules/aps-system/src/main/resources/mapper/system/SysUserMapper.xml       |   12 ++++++------
 11 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysConfigMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysConfigMapper.xml
index 4825725..2baf673 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysConfigMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysConfigMapper.xml
@@ -42,13 +42,13 @@
         <include refid="selectConfigVo"/>
         <where>
 			<if test="configName != null and configName != ''">
-				AND config_name like concat('%', #{configName}, '%')
+				AND config_name like '%' || #{configName} || '%'
 			</if>
 			<if test="configType != null and configType != ''">
 				AND config_type = #{configType}
 			</if>
 			<if test="configKey != null and configKey != ''">
-				AND config_key like concat('%', #{configKey}, '%')
+				AND config_key like '%' || #{configKey} || '%'
 			</if>
 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
 				and date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml
index cb98780..76e6110 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -40,7 +40,7 @@
 			AND parent_id = #{parentId}
 		</if>
 		<if test="deptName != null and deptName != ''">
-			AND dept_name like concat('%', #{deptName}, '%')
+			AND dept_name like '%' || #{deptName} '%'
 		</if>
 		<if test="status != null and status != ''">
 			AND status = #{status}
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysDictDataMapper.xml
index 82044e0..88d8803 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysDictDataMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysDictDataMapper.xml
@@ -32,7 +32,7 @@
 				AND dict_type = #{dictType}
 			</if>
 			<if test="dictLabel != null and dictLabel != ''">
-				AND dict_label like concat('%', #{dictLabel}, '%')
+				AND dict_label like '%' || #{dictLabel} || '%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
index ebc8ee5..be69fa6 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
@@ -24,13 +24,13 @@
 	    <include refid="selectDictTypeVo"/>
 		<where>
 		    <if test="dictName != null and dictName != ''">
-				AND dict_name like concat('%', cast(#{dictName} as varchar), '%')
+				AND dict_name like '%' || #{dictName} || '%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
 			</if>
 			<if test="dictType != null and dictType != ''">
-				AND dict_type like concat('%', cast(#{dictType} as varchar), '%')
+				AND dict_type like '%' || #{dictType} || '%'
 			</if>
 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
 				and date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysLogininforMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysLogininforMapper.xml
index 8c3f3ff..150db83 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysLogininforMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysLogininforMapper.xml
@@ -22,13 +22,13 @@
 		select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
 		<where>
 			<if test="ipaddr != null and ipaddr != ''">
-				AND ipaddr like concat('%', #{ipaddr}, '%')
+				AND ipaddr like '%' || #{ipaddr} || '%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
 			</if>
 			<if test="userName != null and userName != ''">
-				AND user_name like concat('%', #{userName}, '%')
+				AND user_name like '%' || #{userName} || '%'
 			</if>
 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
 				AND access_time &gt;= #{params.beginTime}
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysMenuMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysMenuMapper.xml
index 4abe231..3454e67 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysMenuMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysMenuMapper.xml
@@ -37,7 +37,7 @@
 		<include refid="selectMenuVo"/>
 		<where>
 			<if test="menuName != null and menuName != ''">
-				AND menu_name like concat('%', #{menuName}, '%')
+				AND menu_name like '%' || #{menuName} || '%'
 			</if>
 			<if test="visible != null and visible != ''">
 				AND visible = #{visible}
@@ -63,7 +63,7 @@
 		left join sys_role ro on ur.role_id = ro.role_id
 		where ur.user_id = #{params.userId}
 		<if test="menuName != null and menuName != ''">
-            AND m.menu_name like concat('%', #{menuName}, '%')
+            AND m.menu_name like '%' || #{menuName} || '%'
 		</if>
 		<if test="visible != null and visible != ''">
             AND m.visible = #{visible}
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysNoticeMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysNoticeMapper.xml
index 0a41e5d..322af0c 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysNoticeMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysNoticeMapper.xml
@@ -31,13 +31,13 @@
         <include refid="selectNoticeVo"/>
         <where>
 			<if test="noticeTitle != null and noticeTitle != ''">
-				AND notice_title like concat('%', #{noticeTitle}, '%')
+				AND notice_title like '%' || #{noticeTitle} || '%'
 			</if>
 			<if test="noticeType != null and noticeType != ''">
 				AND notice_type = #{noticeType}
 			</if>
 			<if test="createBy != null and createBy != ''">
-				AND create_by like concat('%', #{createBy}, '%')
+				AND create_by like '%' || #{createBy} || '%'
 			</if>
 		</where>
     </select>
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysOperLogMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysOperLogMapper.xml
index e37f793..cbe3983 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysOperLogMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysOperLogMapper.xml
@@ -37,10 +37,10 @@
 		<include refid="selectOperLogVo"/>
 		<where>
 			<if test="operIp != null and operIp != ''">
-				AND oper_ip like concat('%', #{operIp}, '%')
+				AND oper_ip like '%' || #{operIp} || '%'
 			</if>
 			<if test="title != null and title != ''">
-				AND title like concat('%', #{title}, '%')
+				AND title like '%' || #{title} || '%'
 			</if>
 			<if test="businessType != null">
 				AND business_type = #{businessType}
@@ -55,7 +55,7 @@
 				AND status = #{status}
 			</if>
 			<if test="operName != null and operName != ''">
-				AND oper_name like concat('%', #{operName}, '%')
+				AND oper_name like '%' || #{operName} || '%'
 			</if>
 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
 				AND oper_time &gt;= #{params.beginTime}
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysPostMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysPostMapper.xml
index 830e8fe..3a68bd2 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysPostMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysPostMapper.xml
@@ -26,13 +26,13 @@
 	    <include refid="selectPostVo"/>
 		<where>
 			<if test="postCode != null and postCode != ''">
-				AND post_code like concat('%', #{postCode}, '%')
+				AND post_code like '%' || #{postCode} || '%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
 			</if>
 			<if test="postName != null and postName != ''">
-				AND post_name like concat('%', #{postName}, '%')
+				AND post_name like '%' || #{postName} || '%'
 			</if>
 		</where>
 	</select>
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysRoleMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysRoleMapper.xml
index 3ff7826..72a9ded 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysRoleMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -37,13 +37,13 @@
 			AND r.role_id = #{roleId}
 		</if>
 		<if test="roleName != null and roleName != ''">
-			AND r.role_name like concat('%', #{roleName}, '%')
+			AND r.role_name like '%' || #{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}, '%')
+			AND r.role_key like '%' || #{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')
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysUserMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysUserMapper.xml
index 5e80f08..84f48cb 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -64,13 +64,13 @@
 			AND u.user_id = #{userId}
 		</if>
 		<if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
+			AND u.user_name like '%' || #{userName} || '%'
 		</if>
 		<if test="status != null and status != ''">
 			AND u.status = #{status}
 		</if>
 		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+			AND u.phonenumber like '%' || #{phonenumber} || '%'
 		</if>
 		<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
 			AND date_format(u.create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
@@ -93,10 +93,10 @@
 			 left join sys_role r on r.role_id = ur.role_id
 	    where u.del_flag = '0' and r.role_id = #{roleId}
 	    <if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
+			AND u.user_name like '%' || #{userName} || '%'
 		</if>
 		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+			AND u.phonenumber like '%' || #{phonenumber} || '%'
 		</if>
 		<!-- 鏁版嵁鑼冨洿杩囨护 -->
 		${params.dataScope}
@@ -111,10 +111,10 @@
 	    where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
 	    and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
 	    <if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
+			AND u.user_name like '%' || #{userName} || '%'
 		</if>
 		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+			AND u.phonenumber like '%' || #{phonenumber} || '%'
 		</if>
 		<!-- 鏁版嵁鑼冨洿杩囨护 -->
 		${params.dataScope}

--
Gitblit v1.9.3