81 lines
3.6 KiB
XML
81 lines
3.6 KiB
XML
<?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.zhwl.statistics.mapper.ZdyCheckSearchDictMapper">
|
|
|
|
<resultMap type="ZdyCheckSearchDict" id="ZdyCheckSearchDictResult">
|
|
<result property="value" column="value"/>
|
|
<result property="label" column="label"/>
|
|
<result property="sort" column="sort"/>
|
|
<result property="type" column="type"/>
|
|
<result property="instruction" column="instruction"/>
|
|
<result property="dict" column="dict"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectZdyCheckSearchDictVo">
|
|
select value, label, sort, type, instruction,dict from zdy_check_search_dict
|
|
</sql>
|
|
|
|
<select id="selectZdyCheckSearchDictList" parameterType="ZdyCheckSearchDict" resultMap="ZdyCheckSearchDictResult">
|
|
<include refid="selectZdyCheckSearchDictVo"/>
|
|
<where>
|
|
<if test="label != null and label != ''">and label = #{label}</if>
|
|
<if test="sort != null ">and sort = #{sort}</if>
|
|
<if test="type != null and type != ''">and type = #{type}</if>
|
|
<if test="instruction != null and instruction != ''">and instruction = #{instruction}</if>
|
|
</where>
|
|
order by type,sort
|
|
</select>
|
|
|
|
<select id="selectZdyCheckSearchDictByValue" parameterType="String" resultMap="ZdyCheckSearchDictResult">
|
|
<include refid="selectZdyCheckSearchDictVo"/>
|
|
where value = #{value}
|
|
</select>
|
|
<select id="getDictName" resultType="com.zhwl.common.core.domain.entity.SysDictData">
|
|
SELECT id dictCode,id dictSort, id dictValue,name dictLabel,"ticket_name" dictType FROM zhwl_standard.zdy_ticket
|
|
</select>
|
|
|
|
<insert id="insertZdyCheckSearchDict" parameterType="ZdyCheckSearchDict">
|
|
insert into zdy_check_search_dict
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="value != null">value,</if>
|
|
<if test="label != null">label,</if>
|
|
<if test="sort != null">sort,</if>
|
|
<if test="type != null">type,</if>
|
|
<if test="instruction != null">instruction,</if>
|
|
<if test="dict != null">dict,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="value != null">#{value},</if>
|
|
<if test="label != null">#{label},</if>
|
|
<if test="sort != null">#{sort},</if>
|
|
<if test="type != null">#{type},</if>
|
|
<if test="instruction != null">#{instruction},</if>
|
|
<if test="dict != null">#{dict},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateZdyCheckSearchDict" parameterType="ZdyCheckSearchDict">
|
|
update zdy_check_search_dict
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="label != null">label = #{label},</if>
|
|
<if test="sort != null">sort = #{sort},</if>
|
|
<if test="type != null">type = #{type},</if>
|
|
<if test="instruction != null">instruction = #{instruction},</if>
|
|
<if test="dict != null">dict = #{dict},</if>
|
|
</trim>
|
|
where value = #{value}
|
|
</update>
|
|
|
|
<delete id="deleteZdyCheckSearchDictByValue" parameterType="String">
|
|
delete from zdy_check_search_dict where value = #{value}
|
|
</delete>
|
|
|
|
<delete id="deleteZdyCheckSearchDictByValues" parameterType="String">
|
|
delete from zdy_check_search_dict where value in
|
|
<foreach item="value" collection="array" open="(" separator="," close=")">
|
|
#{value}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |