<?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="SYxglPosterinfoMapper" >
    <!-- 通用查询映射结果 -->

    <select id="selectSYxglPosterinfoList" parameterType="pd" resultType="pd">
        select * from s_yxgl_posterinfo where 1=1
        <if test="posterId !=null and posterId !='' ">
            and posterId = #{posterId}
        </if>
        <if test="posterName !=null and posterName !='' ">
            and posterName = #{posterName}
        </if>
        <if test="status !=null and status !='' ">
            and status = #{status}
        </if>
        <if test="createTime !=null and createTime !='' ">
            and createTime = #{createTime}
        </if>
    </select>


    <update id="updateSYxglPosterinfo" parameterType="pd" >
        update s_yxgl_posterinfo
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="posterName !=null and posterName !='' ">
            posterName = #{posterName},
        </if>
        <if test="status !=null and status !='' ">
            status = #{status},
        </if>
        <if test="createTime !=null and createTime !='' ">
            createTime = #{createTime},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

    <delete id="SYxglPosterinfoRemove" parameterType="pd">
        <if test="ids != null">
            delete from s_yxgl_posterinfo where
            <if test="ids != null">
                id in(${ids})
            </if>
        </if>
    </delete>

    <insert id="addSYxglPosterinfo" parameterType="pd" >

        insert into s_yxgl_posterinfo
        <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">

        <if test="posterName !=null and posterName !='' ">
            posterName,
        </if>
        <if test="status !=null and status !='' ">
            status,
        </if>
        <if test="createTime !=null and createTime !='' ">
            createTime,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="posterName !=null and posterName !='' ">
             #{posterName},
        </if>
        <if test="status !=null and status !='' ">
             #{status},
        </if>
        <if test="createTime !=null and createTime !='' ">
             #{createTime},
        </if>
        </trim>

    </insert>

</mapper>
