kongzy
2023-12-08 ca5445257b1fdeceddf3fcc2dea18c442023aeb7
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
<?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>
            <if test="name != null and name != ''">
                AND d.name like concat('%', #{name}, '%')
            </if>
            <if test="status != null and status != ''">
                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 d.dict_type = #{dictType} limit 1
    </select>
 
    <select id="getDictTypeByType" resultType="com.gkhy.assess.system.domain.SysDictType">
        <include refid="selectDictTypeVo"/>
        where d.dict_type = #{dictType}
    </select>
 
 
</mapper>