<?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.odcc.cpzidc.bis.mapper.IdcNoIndexMapper">
|
|
<resultMap type="IdcNoIndex" id="IdcNoIndexResult">
|
<result property="id" column="id" />
|
<result property="telNo" column="tel_no" />
|
<result property="productionYear" column="production_year" />
|
<result property="index" column="index" />
|
</resultMap>
|
|
<sql id="selectIdcNoIndexVo">
|
select id, tel_no, production_year, 'index' from idc_no_index
|
</sql>
|
|
<select id="selectIdcNoIndexList" parameterType="IdcNoIndex" resultMap="IdcNoIndexResult">
|
<include refid="selectIdcNoIndexVo"/>
|
<where>
|
<if test="telNo != null and telNo != ''"> and tel_no = #{telNo}</if>
|
<if test="productionYear != null and productionYear != ''"> and production_year = #{productionYear}</if>
|
<if test="index != null and index != ''"> and 'index' = #{index}</if>
|
</where>
|
</select>
|
|
<select id="selectIdcNoIndexById" parameterType="Long" resultMap="IdcNoIndexResult">
|
<include refid="selectIdcNoIndexVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertIdcNoIndex" parameterType="IdcNoIndex" useGeneratedKeys="true" keyProperty="id">
|
insert into idc_no_index
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="telNo != null">tel_no,</if>
|
<if test="productionYear != null">production_year,</if>
|
<if test="index != null">index,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="telNo != null">#{telNo},</if>
|
<if test="productionYear != null">#{productionYear},</if>
|
<if test="index != null">#{index},</if>
|
</trim>
|
</insert>
|
|
<update id="updateIdcNoIndex" parameterType="IdcNoIndex">
|
update idc_no_index
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="telNo != null">tel_no = #{telNo},</if>
|
<if test="productionYear != null">production_year = #{productionYear},</if>
|
<if test="index != null">index = #{index},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteIdcNoIndexById" parameterType="Long">
|
delete from idc_no_index where id = #{id}
|
</delete>
|
|
<delete id="deleteIdcNoIndexByIds" parameterType="String">
|
delete from idc_no_index where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|