<?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_acceptance_infor.mapper.TGuijiXinKerAcceptanceInforMapper">

    <sql id="selectVo">
        select id, Number, Datetime, Acceptor, Information, TaskType, BusinessType, DetailedInformation, Content from t_guiji_gas_xinker_acceptance_infor
    </sql>

    <select id="selectList" parameterType="TGuijiXinKerAcceptanceInfor" resultType="TGuijiXinKerAcceptanceInfor">
        <include refid="selectVo"/>
        <where>
            <if test="Number != null  and Number != ''"> and Number like concat('%', #{Number}, '%')</if>
            <if test="Datetime != null  and Datetime != ''"> and Datetime like concat('%', #{Datetime}, '%')</if>
            <if test="Acceptor != null  and Acceptor != ''"> and Acceptor like concat('%', #{Acceptor}, '%')</if>
            <if test="Information != null  and Information != ''"> and Information like concat('%', #{Information}, '%')</if>
            <if test="TaskType != null  and TaskType != ''"> and TaskType like concat('%', #{TaskType}, '%')</if>
            <if test="BusinessType != null  and BusinessType != ''"> and BusinessType like concat('%', #{BusinessType}, '%')</if>
            <if test="DetailedInformation != null  and DetailedInformation != ''"> and DetailedInformation like concat('%', #{DetailedInformation}, '%')</if>
            <if test="Content != null  and Content != ''"> and Content like concat('%', #{Content}, '%')</if>
        </where>
    </select>

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

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

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

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

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

</mapper>
