kongzy
2024-01-29 983bdb5b89932b38d08a11ad1eed6ea89d1597e1
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?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.gkhy.assess.system.mapper.SysDictTypeMapper">
 
    <sql id="selectDictTypeVo">
        select d.id,d.name,d.dict_type,d.status,d.create_time,d.remark
        from sys_dict_type d
    </sql>
    <select id="dictTypeList" resultType="com.gkhy.assess.system.domain.SysDictType">
        <include refid="selectDictTypeVo"/>
        <where>
            and d.del_flag=0
            <if test="name != null and name != ''">
                AND d.name like concat('%', #{name}, '%')
            </if>
            <if test="status != null">
                AND d.status = #{status}
            </if>
            <if test="dictType != null and dictType != ''">
                AND d.dict_type like concat('%', #{dictType}, '%')
            </if>
        </where>
    </select>
 
    <select id="getDictTypeById" resultType="com.gkhy.assess.system.domain.SysDictType">
        <include refid="selectDictTypeVo"/>
        where d.id=#{dictId}
    </select>
 
    <select id="checkDictTypeUnique" resultType="com.gkhy.assess.system.domain.SysDictType">
        <include refid="selectDictTypeVo"/>
        <where>
            and (d.dict_type = #{dictType}
            <if test="name!=null and name!=''">
                or name=#{name}
            </if>
            )
            and d.del_flag=0 limit 1
        </where>
    </select>
 
    <select id="getDictTypeByType" resultType="com.gkhy.assess.system.domain.SysDictType">
        <include refid="selectDictTypeVo"/>
        where d.dict_type = #{dictType} and d.del_flag=0
    </select>
 
 
</mapper>