<?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.sooka.system.gas.xinKer_disposition_infor.mapper.TGuijiXinKerDispositionInforMapper">

    <sql id="selectVo">
        select id, ClerkOrdering, DateTime, Worker, ResultCode, Content from t_guiji_gas_xinker_disposition_info
    </sql>

    <select id="selectList" parameterType="TGuijiXinKerDispositionInfor" resultType="TGuijiXinKerDispositionInfor">
        <include refid="selectVo"/>
        <where>
            <if test="ClerkOrdering != null  and ClerkOrdering != ''"> and ClerkOrdering like concat('%', #{ClerkOrdering}, '%')</if>
            <if test="DateTime != null  and DateTime != ''"> and DateTime like concat('%', #{DateTime}, '%')</if>
            <if test="Worker != null  and Worker != ''"> and Worker like concat('%', #{Worker}, '%')</if>
            <if test="ResultCode != null  and ResultCode != ''"> and ResultCode like concat('%', #{ResultCode}, '%')</if>
            <if test="Content != null  and Content != ''"> and Content like concat('%', #{Content}, '%')</if>
        </where>
    </select>

    <select id="selectById" parameterType="String" resultType="TGuijiXinKerDispositionInfor">
        <include refid="selectVo"/>
        where id = #{id}
    </select>

    <insert id="insert" parameterType="TGuijiXinKerDispositionInfor">
        insert into t_guiji_gas_xinker_disposition_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
         </trim>
    </insert>

    <update id="update" parameterType="TGuijiXinKerDispositionInfor">
        update t_guiji_gas_xinker_disposition_info
        <trim prefix="SET" suffixOverrides=",">
        </trim>
        where id = #{id}
    </update>

    <delete id="deleteById" parameterType="String">
        delete from t_guiji_gas_xinker_disposition_info where id = #{id}
    </delete>

    <delete id="deleteByIds" parameterType="String">
        delete from t_guiji_gas_xinker_disposition_info where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>

</mapper>
