diff --git a/src/main/resources/mybatis/monitor/JobLogMapper.xml b/src/main/resources/mybatis/monitor/JobLogMapper.xml index 11ada037..88147da9 100644 --- a/src/main/resources/mybatis/monitor/JobLogMapper.xml +++ b/src/main/resources/mybatis/monitor/JobLogMapper.xml @@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select * from sys_job_log <where> <if test="searchValue != null and searchValue != ''"> - AND job_name like concat(concat('%', #{searchValue}), '%') OR method_name like concat(concat('%', #{searchValue}), '%') + AND job_name like concat('%', #{searchValue}, '%') OR method_name like concat('%', #{searchValue}, '%') </if> </where> </select> diff --git a/src/main/resources/mybatis/monitor/JobMapper.xml b/src/main/resources/mybatis/monitor/JobMapper.xml index 1d4b1b4d..59faf1d3 100644 --- a/src/main/resources/mybatis/monitor/JobMapper.xml +++ b/src/main/resources/mybatis/monitor/JobMapper.xml @@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select job_id, job_name, job_group, method_name, params, cron_expression, status, create_by, create_time, remark from sys_job <where> <if test="searchValue != null and searchValue != ''"> - AND job_name like concat(concat('%', #{searchValue}), '%') OR method_name like concat(concat('%', #{searchValue}), '%') + AND job_name like concat('%', #{searchValue}, '%') OR method_name like concat('%', #{searchValue}, '%') </if> </where> </select> diff --git a/src/main/resources/mybatis/monitor/LogininforMapper.xml b/src/main/resources/mybatis/monitor/LogininforMapper.xml index 6a0207c4..6085d9eb 100644 --- a/src/main/resources/mybatis/monitor/LogininforMapper.xml +++ b/src/main/resources/mybatis/monitor/LogininforMapper.xml @@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select * from sys_logininfor <where> <if test="searchValue != null and searchValue != ''"> - AND login_name like concat(concat('%', #{searchValue}), '%') + AND login_name like concat('%', #{searchValue}, '%') </if> </where> </select> diff --git a/src/main/resources/mybatis/monitor/OnlineMapper.xml b/src/main/resources/mybatis/monitor/OnlineMapper.xml index 4d1cc0f2..93735a77 100644 --- a/src/main/resources/mybatis/monitor/OnlineMapper.xml +++ b/src/main/resources/mybatis/monitor/OnlineMapper.xml @@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select * from sys_user_online <where> <if test="searchValue != null and searchValue != ''"> - AND login_name like concat(concat('%', #{searchValue}), '%') + AND login_name like concat('%', #{searchValue}, '%') </if> </where> </select> diff --git a/src/main/resources/mybatis/monitor/OperLogMapper.xml b/src/main/resources/mybatis/monitor/OperLogMapper.xml index bc18d2e7..1ab1241b 100644 --- a/src/main/resources/mybatis/monitor/OperLogMapper.xml +++ b/src/main/resources/mybatis/monitor/OperLogMapper.xml @@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select * from sys_oper_log <where> <if test="searchValue != null and searchValue != ''"> - AND login_name like concat(concat('%', #{searchValue}), '%') + AND login_name like concat('%', #{searchValue}, '%') </if> </where> </select> diff --git a/src/main/resources/mybatis/system/ConfigMapper.xml b/src/main/resources/mybatis/system/ConfigMapper.xml index 4849ca21..ef730acb 100644 --- a/src/main/resources/mybatis/system/ConfigMapper.xml +++ b/src/main/resources/mybatis/system/ConfigMapper.xml @@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark from sys_config <where> <if test="searchValue != null and searchValue != ''"> - AND config_name like concat(concat('%', #{searchValue}), '%') OR config_key like concat(concat('%', #{searchValue}), '%') + AND config_name like concat('%', #{searchValue}, '%') OR config_key like concat('%', #{searchValue}, '%') </if> </where> </select> diff --git a/src/main/resources/mybatis/system/DictDataMapper.xml b/src/main/resources/mybatis/system/DictDataMapper.xml index d6a5bd4b..28a03045 100644 --- a/src/main/resources/mybatis/system/DictDataMapper.xml +++ b/src/main/resources/mybatis/system/DictDataMapper.xml @@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, is_default, status, create_by, create_time, remark from sys_dict_data <where> <if test="searchValue != null and searchValue != ''"> - AND dict_label like concat(concat('%', #{searchValue}), '%') + AND dict_label like concat('%', #{searchValue}, '%') </if> <if test="dictType != null and dictType != ''"> AND dict_type = #{dictType} diff --git a/src/main/resources/mybatis/system/DictTypeMapper.xml b/src/main/resources/mybatis/system/DictTypeMapper.xml index 2a23504a..52724f7c 100644 --- a/src/main/resources/mybatis/system/DictTypeMapper.xml +++ b/src/main/resources/mybatis/system/DictTypeMapper.xml @@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select dict_id, dict_name, dict_type, status, create_by, create_time, remark from sys_dict_type <where> <if test="searchValue != null and searchValue != ''"> - AND dict_name like concat(concat('%', #{searchValue}), '%') OR dict_type like concat(concat('%', #{searchValue}), '%') + AND dict_name like concat('%', #{searchValue}, '%') OR dict_type like concat('%', #{searchValue}, '%') </if> </where> </select> diff --git a/src/main/resources/mybatis/system/PostMapper.xml b/src/main/resources/mybatis/system/PostMapper.xml index c1c130a8..e5e85624 100644 --- a/src/main/resources/mybatis/system/PostMapper.xml +++ b/src/main/resources/mybatis/system/PostMapper.xml @@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark from sys_post <where> <if test="searchValue != null and searchValue != ''"> - AND post_code like concat(concat('%', #{searchValue}), '%') OR post_name like concat(concat('%', #{searchValue}), '%') + AND post_code like concat('%', #{searchValue}, '%') OR post_name like concat('%', #{searchValue}, '%') </if> </where> </select> diff --git a/src/main/resources/mybatis/system/RoleMapper.xml b/src/main/resources/mybatis/system/RoleMapper.xml index 7259ae60..e7bb09a7 100644 --- a/src/main/resources/mybatis/system/RoleMapper.xml +++ b/src/main/resources/mybatis/system/RoleMapper.xml @@ -21,10 +21,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select role_id, role_name, role_key, role_sort, status, create_time, remark from sys_role <where> <if test="roleName != null and roleName != ''"> - AND role_name like concat(concat('%', #{roleName}), '%') + AND role_name like concat('%', #{roleName}, '%') </if> <if test="roleKey != null and roleKey != ''"> - AND role_key like concat(concat('%', #{roleKey}), '%') + AND role_key like concat('%', #{roleKey}, '%') </if> <if test="status != null and status != ''"> AND status = #{status} diff --git a/src/main/resources/mybatis/system/UserMapper.xml b/src/main/resources/mybatis/system/UserMapper.xml index ca0850a4..57fa35ca 100644 --- a/src/main/resources/mybatis/system/UserMapper.xml +++ b/src/main/resources/mybatis/system/UserMapper.xml @@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sys_dept d on u.dept_id = d.dept_id where u.status in (0,1) <if test="searchValue != null and searchValue != ''"> - AND u.login_name like concat(concat('%', #{searchValue}), '%') + AND u.login_name like concat('%', #{searchValue}, '%') </if> <if test="deptId != null and parentId != null and parentId != 0"> AND u.dept_id IN (SELECT t.dept_id FROM sys_dept t WHERE t.dept_id = #{deptId} OR t.parent_id = #{deptId}) diff --git a/src/main/resources/mybatis/tool/GenMapper.xml b/src/main/resources/mybatis/tool/GenMapper.xml index a11287bf..e338cdd4 100644 --- a/src/main/resources/mybatis/tool/GenMapper.xml +++ b/src/main/resources/mybatis/tool/GenMapper.xml @@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from information_schema.tables where table_comment <![CDATA[ <> ]]> '' and table_schema = (select database()) <if test="searchValue != null and searchValue != ''"> - AND table_name like concat(concat('%', #{searchValue}), '%'); + AND table_name like concat('%', #{searchValue}, '%'); </if> </select>