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

    <select id="selectSJkglGyhyYjtjActivityinfoList" parameterType="pd" resultType="pd">
        select * from s_jkgl_gyhy_yjtj_activityinfo where 1=1
        <if test="creationDate !=null and creationDate !='' ">
            and creationDate = #{creationDate}
        </if>
        <if test="theme !=null and theme !='' ">
            and theme = #{theme}
        </if>
        <if test="startTime !=null and startTime !='' ">
            and startTime = #{startTime}
        </if>
        <if test="endTime !=null and endTime !='' ">
            and endTime = #{endTime}
        </if>
        <if test="usedContract !=null and usedContract !='' ">
            and usedContract = #{usedContract}
        </if>
        <if test="status !=null and status !='' ">
            and status = #{status}
        </if>
        <if test="invitedCount !=null and invitedCount !='' ">
            and invitedCount = #{invitedCount}
        </if>
        <if test="successCount !=null and successCount !='' ">
            and successCount = #{successCount}
        </if>
    </select>


    <update id="updateSJkglGyhyYjtjActivityinfo" parameterType="pd" >
        update s_jkgl_gyhy_yjtj_activityinfo
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="creationDate !=null and creationDate !='' ">
            creationDate = #{creationDate},
        </if>
        <if test="theme !=null and theme !='' ">
            theme = #{theme},
        </if>
        <if test="startTime !=null and startTime !='' ">
            startTime = #{startTime},
        </if>
        <if test="endTime !=null and endTime !='' ">
            endTime = #{endTime},
        </if>
        <if test="usedContract !=null and usedContract !='' ">
            usedContract = #{usedContract},
        </if>
        <if test="status !=null and status !='' ">
            status = #{status},
        </if>
        <if test="invitedCount !=null and invitedCount !='' ">
            invitedCount = #{invitedCount},
        </if>
        <if test="successCount !=null and successCount !='' ">
            successCount = #{successCount},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

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

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

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

        <if test="creationDate !=null and creationDate !='' ">
            creationDate,
        </if>
        <if test="theme !=null and theme !='' ">
            theme,
        </if>
        <if test="startTime !=null and startTime !='' ">
            startTime,
        </if>
        <if test="endTime !=null and endTime !='' ">
            endTime,
        </if>
        <if test="usedContract !=null and usedContract !='' ">
            usedContract,
        </if>
        <if test="status !=null and status !='' ">
            status,
        </if>
        <if test="invitedCount !=null and invitedCount !='' ">
            invitedCount,
        </if>
        <if test="successCount !=null and successCount !='' ">
            successCount,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="creationDate !=null and creationDate !='' ">
             #{creationDate},
        </if>
        <if test="theme !=null and theme !='' ">
             #{theme},
        </if>
        <if test="startTime !=null and startTime !='' ">
             #{startTime},
        </if>
        <if test="endTime !=null and endTime !='' ">
             #{endTime},
        </if>
        <if test="usedContract !=null and usedContract !='' ">
             #{usedContract},
        </if>
        <if test="status !=null and status !='' ">
             #{status},
        </if>
        <if test="invitedCount !=null and invitedCount !='' ">
             #{invitedCount},
        </if>
        <if test="successCount !=null and successCount !='' ">
             #{successCount},
        </if>
        </trim>

    </insert>

</mapper>
