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

    <select id="selectSYxglZhspCombinationproductList" parameterType="pd" resultType="pd">
        select * from s_yxgl_zhsp_combinationproduct where 1=1
        <if test="id !=null and id !='' ">
            and id = #{id}
        </if>
        <if test="comboProductName !=null and comboProductName !='' ">
            and comboProductName = #{comboProductName}
        </if>
        <if test="effectiveTime !=null and effectiveTime !='' ">
            and effectiveTime = #{effectiveTime}
        </if>
        <if test="status !=null and status !='' ">
            and status = #{status}
        </if>
        <if test="eligibleUsers !=null and eligibleUsers !='' ">
            and eligibleUsers = #{eligibleUsers}
        </if>
        <if test="effectiveStore !=null and effectiveStore !='' ">
            and effectiveStore = #{effectiveStore}
        </if>
        <if test="totalQuantity !=null and totalQuantity !='' ">
            and totalQuantity = #{totalQuantity}
        </if>
        <if test="comboPrice !=null and comboPrice !='' ">
            and comboPrice = #{comboPrice}
        </if>
        <if test="createTime !=null and createTime !='' ">
            and createTime = #{createTime}
        </if>
        <if test="creator !=null and creator !='' ">
            and creator = #{creator}
        </if>
    </select>


    <update id="updateSYxglZhspCombinationproduct" parameterType="pd" >
        update s_yxgl_zhsp_combinationproduct
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="comboProductName !=null and comboProductName !='' ">
            comboProductName = #{comboProductName},
        </if>
        <if test="effectiveTime !=null and effectiveTime !='' ">
            effectiveTime = #{effectiveTime},
        </if>
        <if test="status !=null and status !='' ">
            status = #{status},
        </if>
        <if test="eligibleUsers !=null and eligibleUsers !='' ">
            eligibleUsers = #{eligibleUsers},
        </if>
        <if test="effectiveStore !=null and effectiveStore !='' ">
            effectiveStore = #{effectiveStore},
        </if>
        <if test="totalQuantity !=null and totalQuantity !='' ">
            totalQuantity = #{totalQuantity},
        </if>
        <if test="comboPrice !=null and comboPrice !='' ">
            comboPrice = #{comboPrice},
        </if>
        <if test="createTime !=null and createTime !='' ">
            createTime = #{createTime},
        </if>
        <if test="creator !=null and creator !='' ">
            creator = #{creator},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

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

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

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

        <if test="comboProductName !=null and comboProductName !='' ">
            comboProductName,
        </if>
        <if test="effectiveTime !=null and effectiveTime !='' ">
            effectiveTime,
        </if>
        <if test="status !=null and status !='' ">
            status,
        </if>
        <if test="eligibleUsers !=null and eligibleUsers !='' ">
            eligibleUsers,
        </if>
        <if test="effectiveStore !=null and effectiveStore !='' ">
            effectiveStore,
        </if>
        <if test="totalQuantity !=null and totalQuantity !='' ">
            totalQuantity,
        </if>
        <if test="comboPrice !=null and comboPrice !='' ">
            comboPrice,
        </if>
        <if test="createTime !=null and createTime !='' ">
            createTime,
        </if>
        <if test="creator !=null and creator !='' ">
            creator,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="comboProductName !=null and comboProductName !='' ">
             #{comboProductName},
        </if>
        <if test="effectiveTime !=null and effectiveTime !='' ">
             #{effectiveTime},
        </if>
        <if test="status !=null and status !='' ">
             #{status},
        </if>
        <if test="eligibleUsers !=null and eligibleUsers !='' ">
             #{eligibleUsers},
        </if>
        <if test="effectiveStore !=null and effectiveStore !='' ">
             #{effectiveStore},
        </if>
        <if test="totalQuantity !=null and totalQuantity !='' ">
             #{totalQuantity},
        </if>
        <if test="comboPrice !=null and comboPrice !='' ">
             #{comboPrice},
        </if>
        <if test="createTime !=null and createTime !='' ">
             #{createTime},
        </if>
        <if test="creator !=null and creator !='' ">
             #{creator},
        </if>
        </trim>

    </insert>

</mapper>
