<?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>
|