leomon
2025-05-14 3387f6754a07694dda1307849a3ab6fe8a24d7c5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.oying.modules.system.mapper.DictMapper">
    <resultMap id="BaseResultMap" type="com.oying.modules.system.domain.Dict">
        <id column="dict_id" property="id" jdbcType="BIGINT"/>
        <result column="name" property="name" jdbcType="VARCHAR"/>
        <result column="description" property="description" jdbcType="VARCHAR"/>
        <result column="create_by" property="createBy" jdbcType="VARCHAR"/>
        <result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
    </resultMap>
 
    <sql id="Base_Column_List">
        d.dict_id, d.name, d.description, d.create_by, d.update_by, d.create_time, d.update_time
    </sql>
 
    <select id="findAll" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List"/>
        from sys_dict d
        <where>
            <if test="criteria.blurry != null and criteria.blurry != ''">
                and (
                d.name like concat('%', #{criteria.blurry}, '%')
                or d.description like concat('%', #{criteria.blurry}, '%')
                )
            </if>
        </where>
        order by d.dict_id desc
    </select>
</mapper>