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

    <select id="selectSJkglGyhyHyflCategoryinfoList" parameterType="pd" resultType="pd">
        select * from s_jkgl_gyhy_hyfl_categoryinfo where 1=1
        <if test="creationDate !=null and creationDate !='' ">
            and creationDate = #{creationDate}
        </if>
        <if test="categoryName !=null and categoryName !='' ">
            and categoryName = #{categoryName}
        </if>
        <if test="includedContracts !=null and includedContracts !='' ">
            and includedContracts = #{includedContracts}
        </if>
        <if test="featuredImage !=null and featuredImage !='' ">
            and featuredImage = #{featuredImage}
        </if>
    </select>


    <update id="updateSJkglGyhyHyflCategoryinfo" parameterType="pd" >
        update s_jkgl_gyhy_hyfl_categoryinfo
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="creationDate !=null and creationDate !='' ">
            creationDate = #{creationDate},
        </if>
        <if test="categoryName !=null and categoryName !='' ">
            categoryName = #{categoryName},
        </if>
        <if test="includedContracts !=null and includedContracts !='' ">
            includedContracts = #{includedContracts},
        </if>
        <if test="featuredImage !=null and featuredImage !='' ">
            featuredImage = #{featuredImage},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

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

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

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

        <if test="creationDate !=null and creationDate !='' ">
            creationDate,
        </if>
        <if test="categoryName !=null and categoryName !='' ">
            categoryName,
        </if>
        <if test="includedContracts !=null and includedContracts !='' ">
            includedContracts,
        </if>
        <if test="featuredImage !=null and featuredImage !='' ">
            featuredImage,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="creationDate !=null and creationDate !='' ">
             #{creationDate},
        </if>
        <if test="categoryName !=null and categoryName !='' ">
             #{categoryName},
        </if>
        <if test="includedContracts !=null and includedContracts !='' ">
             #{includedContracts},
        </if>
        <if test="featuredImage !=null and featuredImage !='' ">
             #{featuredImage},
        </if>
        </trim>

    </insert>

</mapper>
