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

    <select id="selectSHyglHyxxJzyxMarketingplaninfoList" parameterType="pd" resultType="pd">
        select * from s_hygl_hyxx_jzyx_marketingplaninfo where 1=1
        <if test="planUniqueIdentifier !=null and planUniqueIdentifier !='' ">
            and planUniqueIdentifier = #{planUniqueIdentifier}
        </if>
        <if test="planName !=null and planName !='' ">
            and planName = #{planName}
        </if>
        <if test="targetAudienceDescription !=null and targetAudienceDescription !='' ">
            and targetAudienceDescription = #{targetAudienceDescription}
        </if>
        <if test="executionMethods !=null and executionMethods !='' ">
            and executionMethods = #{executionMethods}
        </if>
        <if test="promotionChannels !=null and promotionChannels !='' ">
            and promotionChannels = #{promotionChannels}
        </if>
        <if test="startDate !=null and startDate !='' ">
            and startDate = #{startDate}
        </if>
        <if test="taskExecutionTime !=null and taskExecutionTime !='' ">
            and taskExecutionTime = #{taskExecutionTime}
        </if>
        <if test="groupBelongingName !=null and groupBelongingName !='' ">
            and groupBelongingName = #{groupBelongingName}
        </if>
        <if test="estimatedParticipants !=null and estimatedParticipants !='' ">
            and estimatedParticipants = #{estimatedParticipants}
        </if>
        <if test="actualParticipants !=null and actualParticipants !='' ">
            and actualParticipants = #{actualParticipants}
        </if>
        <if test="taskPushProgress !=null and taskPushProgress !='' ">
            and taskPushProgress = #{taskPushProgress}
        </if>
        <if test="taskCompletionProgress !=null and taskCompletionProgress !='' ">
            and taskCompletionProgress = #{taskCompletionProgress}
        </if>
        <if test="planStatus !=null and planStatus !='' ">
            and planStatus = #{planStatus}
        </if>
        <if test="createdByUser !=null and createdByUser !='' ">
            and createdByUser = #{createdByUser}
        </if>
    </select>


    <update id="updateSHyglHyxxJzyxMarketingplaninfo" parameterType="pd" >
        update s_hygl_hyxx_jzyx_marketingplaninfo
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="planUniqueIdentifier !=null and planUniqueIdentifier !='' ">
            planUniqueIdentifier = #{planUniqueIdentifier},
        </if>
        <if test="planName !=null and planName !='' ">
            planName = #{planName},
        </if>
        <if test="targetAudienceDescription !=null and targetAudienceDescription !='' ">
            targetAudienceDescription = #{targetAudienceDescription},
        </if>
        <if test="executionMethods !=null and executionMethods !='' ">
            executionMethods = #{executionMethods},
        </if>
        <if test="promotionChannels !=null and promotionChannels !='' ">
            promotionChannels = #{promotionChannels},
        </if>
        <if test="startDate !=null and startDate !='' ">
            startDate = #{startDate},
        </if>
        <if test="taskExecutionTime !=null and taskExecutionTime !='' ">
            taskExecutionTime = #{taskExecutionTime},
        </if>
        <if test="groupBelongingName !=null and groupBelongingName !='' ">
            groupBelongingName = #{groupBelongingName},
        </if>
        <if test="estimatedParticipants !=null and estimatedParticipants !='' ">
            estimatedParticipants = #{estimatedParticipants},
        </if>
        <if test="actualParticipants !=null and actualParticipants !='' ">
            actualParticipants = #{actualParticipants},
        </if>
        <if test="taskPushProgress !=null and taskPushProgress !='' ">
            taskPushProgress = #{taskPushProgress},
        </if>
        <if test="taskCompletionProgress !=null and taskCompletionProgress !='' ">
            taskCompletionProgress = #{taskCompletionProgress},
        </if>
        <if test="planStatus !=null and planStatus !='' ">
            planStatus = #{planStatus},
        </if>
        <if test="createdByUser !=null and createdByUser !='' ">
            createdByUser = #{createdByUser},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

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

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

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

        <if test="planUniqueIdentifier !=null and planUniqueIdentifier !='' ">
            planUniqueIdentifier,
        </if>
        <if test="planName !=null and planName !='' ">
            planName,
        </if>
        <if test="targetAudienceDescription !=null and targetAudienceDescription !='' ">
            targetAudienceDescription,
        </if>
        <if test="executionMethods !=null and executionMethods !='' ">
            executionMethods,
        </if>
        <if test="promotionChannels !=null and promotionChannels !='' ">
            promotionChannels,
        </if>
        <if test="startDate !=null and startDate !='' ">
            startDate,
        </if>
        <if test="taskExecutionTime !=null and taskExecutionTime !='' ">
            taskExecutionTime,
        </if>
        <if test="groupBelongingName !=null and groupBelongingName !='' ">
            groupBelongingName,
        </if>
        <if test="estimatedParticipants !=null and estimatedParticipants !='' ">
            estimatedParticipants,
        </if>
        <if test="actualParticipants !=null and actualParticipants !='' ">
            actualParticipants,
        </if>
        <if test="taskPushProgress !=null and taskPushProgress !='' ">
            taskPushProgress,
        </if>
        <if test="taskCompletionProgress !=null and taskCompletionProgress !='' ">
            taskCompletionProgress,
        </if>
        <if test="planStatus !=null and planStatus !='' ">
            planStatus,
        </if>
        <if test="createdByUser !=null and createdByUser !='' ">
            createdByUser,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="planUniqueIdentifier !=null and planUniqueIdentifier !='' ">
             #{planUniqueIdentifier},
        </if>
        <if test="planName !=null and planName !='' ">
             #{planName},
        </if>
        <if test="targetAudienceDescription !=null and targetAudienceDescription !='' ">
             #{targetAudienceDescription},
        </if>
        <if test="executionMethods !=null and executionMethods !='' ">
             #{executionMethods},
        </if>
        <if test="promotionChannels !=null and promotionChannels !='' ">
             #{promotionChannels},
        </if>
        <if test="startDate !=null and startDate !='' ">
             #{startDate},
        </if>
        <if test="taskExecutionTime !=null and taskExecutionTime !='' ">
             #{taskExecutionTime},
        </if>
        <if test="groupBelongingName !=null and groupBelongingName !='' ">
             #{groupBelongingName},
        </if>
        <if test="estimatedParticipants !=null and estimatedParticipants !='' ">
             #{estimatedParticipants},
        </if>
        <if test="actualParticipants !=null and actualParticipants !='' ">
             #{actualParticipants},
        </if>
        <if test="taskPushProgress !=null and taskPushProgress !='' ">
             #{taskPushProgress},
        </if>
        <if test="taskCompletionProgress !=null and taskCompletionProgress !='' ">
             #{taskCompletionProgress},
        </if>
        <if test="planStatus !=null and planStatus !='' ">
             #{planStatus},
        </if>
        <if test="createdByUser !=null and createdByUser !='' ">
             #{createdByUser},
        </if>
        </trim>

    </insert>

</mapper>
