<?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_user_infor.mapper.TGuijiXinKerUserInforMapper">

    <sql id="selectVo">
        select id, Name, Sex, Phone, Address from t_guiji_gas_xinker_user_infor
    </sql>

    <select id="selectList" parameterType="TGuijiXinKerUserInfor" resultType="TGuijiXinKerUserInfor">
        <include refid="selectVo"/>
        <where>
            <if test="Name != null  and Name != ''"> and Name like concat('%', #{Name}, '%')</if>
            <if test="Sex != null  and Sex != ''"> and Sex like concat('%', #{Sex}, '%')</if>
            <if test="Phone != null  and Phone != ''"> and Phone like concat('%', #{Phone}, '%')</if>
            <if test="Address != null  and Address != ''"> and Address like concat('%', #{Address}, '%')</if>
        </where>
    </select>

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

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

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

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

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

</mapper>
