<?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.qinchuan_user_infor.mapper.TGuijiQinchuanUserInforMapper">

    <sql id="selectVo">
        select id, C_UserName, C_Telphone, C_AddrInfo, C_Ye, C_PayCode from t_guiji_gas_qinchuan_user_infor
    </sql>

    <select id="selectList" parameterType="TGuijiQinchuanUserInfor" resultType="TGuijiQinchuanUserInfor">
        <include refid="selectVo"/>
        <where>
            <if test="C_UserName != null  and C_UserName != ''"> and C_UserName like concat('%', #{C_UserName}, '%')</if>
            <if test="C_Telphone != null  and C_Telphone != ''"> and C_Telphone like concat('%', #{C_Telphone}, '%')</if>
            <if test="C_AddrInfo != null  and C_AddrInfo != ''"> and C_AddrInfo like concat('%', #{C_AddrInfo}, '%')</if>
            <if test="C_Ye != null  and C_Ye != ''"> and C_Ye like concat('%', #{C_Ye}, '%')</if>
            <if test="C_PayCode != null  and C_PayCode != ''"> and C_PayCode like concat('%', #{C_PayCode}, '%')</if>
        </where>
    </select>

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

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

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

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

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

</mapper>
