<?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.SysDictDataMapper">
|
|
<sql id="selectDictDataVo">
|
select d.id, d.sort, d.label, d.value, d.dict_type,d.is_default, d.status, d.create_time, d.remark
|
from sys_dict_data d
|
</sql>
|
|
<update id="updateDictDataDictType">
|
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
</update>
|
|
<select id="countDictDataByType" resultType="java.lang.Integer">
|
select count(1) from sys_dict_data where dict_type=#{dictType} and del_flag=0
|
</select>
|
|
<select id="getDictDataByType" resultType="com.gkhy.assess.system.domain.SysDictData">
|
<include refid="selectDictDataVo"/>
|
where d.dict_type=#{dictType} and d.status=0 and d.del_flag=0
|
order by d.sort asc
|
</select>
|
|
<select id="getDictDataById" resultType="com.gkhy.assess.system.domain.SysDictData">
|
<include refid="selectDictDataVo"/>
|
where d.id=#{dictId}
|
</select>
|
|
<select id="dictDataList" resultType="com.gkhy.assess.system.domain.SysDictData">
|
<include refid="selectDictDataVo"/>
|
<where>
|
and del_flag=0
|
<if test="dictType != null and dictType != ''">
|
AND dict_type = #{dictType}
|
</if>
|
<if test="label != null and label != ''">
|
AND label like concat('%', #{label}, '%')
|
</if>
|
<if test="status != null">
|
AND status = #{status}
|
</if>
|
</where>
|
</select>
|
</mapper>
|