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

    <select id="selectSJkglRegistrationinfoList" parameterType="pd" resultType="pd">
        select * from s_jkgl_registrationinfo 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="registrationType !=null and registrationType !='' ">
            and registrationType = #{registrationType}
        </if>
        <if test="isStrictControl !=null and isStrictControl !='' ">
            and isStrictControl = #{isStrictControl}
        </if>
        <if test="status !=null and status !='' ">
            and status = #{status}
        </if>
        <if test="registrationCount !=null and registrationCount !='' ">
            and registrationCount = #{registrationCount}
        </if>
    </select>


    <update id="updateSJkglRegistrationinfo" parameterType="pd" >
        update s_jkgl_registrationinfo
        <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="registrationType !=null and registrationType !='' ">
            registrationType = #{registrationType},
        </if>
        <if test="isStrictControl !=null and isStrictControl !='' ">
            isStrictControl = #{isStrictControl},
        </if>
        <if test="status !=null and status !='' ">
            status = #{status},
        </if>
        <if test="registrationCount !=null and registrationCount !='' ">
            registrationCount = #{registrationCount},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

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

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

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

        <if test="creationDate !=null and creationDate !='' ">
            creationDate,
        </if>
        <if test="theme !=null and theme !='' ">
            theme,
        </if>
        <if test="registrationType !=null and registrationType !='' ">
            registrationType,
        </if>
        <if test="isStrictControl !=null and isStrictControl !='' ">
            isStrictControl,
        </if>
        <if test="status !=null and status !='' ">
            status,
        </if>
        <if test="registrationCount !=null and registrationCount !='' ">
            registrationCount,
        </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="registrationType !=null and registrationType !='' ">
             #{registrationType},
        </if>
        <if test="isStrictControl !=null and isStrictControl !='' ">
             #{isStrictControl},
        </if>
        <if test="status !=null and status !='' ">
             #{status},
        </if>
        <if test="registrationCount !=null and registrationCount !='' ">
             #{registrationCount},
        </if>
        </trim>

    </insert>

</mapper>
