支持模糊查询
This commit is contained in:
@@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, status, create_by, create_time, remark from sys_dict_data
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND dict_label = #{searchValue}
|
||||
AND dict_label like concat(concat('%', #{searchValue}), '%')
|
||||
</if>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
AND dict_type = #{dictType}
|
||||
|
@@ -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 = #{searchValue} OR dict_type = #{searchValue}
|
||||
AND dict_name like concat(concat('%', #{searchValue}), '%') OR dict_type like concat(concat('%', #{searchValue}), '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
@@ -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 = #{searchValue} OR post_name = #{searchValue}
|
||||
AND post_code like concat(concat('%', #{searchValue}), '%') OR post_name like concat(concat('%', #{searchValue}), '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
@@ -21,7 +21,7 @@ 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="searchValue != null and searchValue != ''">
|
||||
AND role_name = #{searchValue} OR role_key = #{searchValue}
|
||||
AND role_name like concat(concat('%', #{searchValue}), '%') OR role_key like concat(concat('%', #{searchValue}), '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select user_id, dept_id, login_name, user_name, email, phonenumber, password, sex, avatar, salt, user_type, status, refuse_des, create_by, create_time from sys_user
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND login_name = #{searchValue}
|
||||
AND login_name like concat(concat('%', #{searchValue}), '%')
|
||||
</if>
|
||||
<if test="deptId != null and parentId != null and parentId != 0">
|
||||
AND dept_id IN (SELECT dept_id FROM sys_dept WHERE dept_id = #{deptId} OR parent_id = #{deptId})
|
||||
|
Reference in New Issue
Block a user