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

    <select id="selectSJkglMxbZdyFieldconfigList" parameterType="pd" resultType="pd">
        select * from s_jkgl_mxb_zdy_fieldconfig where 1=1
        <if test="fieldName !=null and fieldName !='' ">
            and fieldName = #{fieldName}
        </if>
        <if test="isEnabled !=null and isEnabled !='' ">
            and isEnabled = #{isEnabled}
        </if>
        <if test="isMandatory !=null and isMandatory !='' ">
            and isMandatory = #{isMandatory}
        </if>
        <if test="unit !=null and unit !='' ">
            and unit = #{unit}
        </if>
        <if test="fieldLength !=null and fieldLength !='' ">
            and fieldLength = #{fieldLength}
        </if>
        <if test="entryForm !=null and entryForm !='' ">
            and entryForm = #{entryForm}
        </if>
        <if test="enableLocation !=null and enableLocation !='' ">
            and enableLocation = #{enableLocation}
        </if>
        <if test="groupName !=null and groupName !='' ">
            and groupName = #{groupName}
        </if>
        <if test="modificationOptions !=null and modificationOptions !='' ">
            and modificationOptions = #{modificationOptions}
        </if>
    </select>


    <update id="updateSJkglMxbZdyFieldconfig" parameterType="pd" >
        update s_jkgl_mxb_zdy_fieldconfig
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="fieldName !=null and fieldName !='' ">
            fieldName = #{fieldName},
        </if>
        <if test="isEnabled !=null and isEnabled !='' ">
            isEnabled = #{isEnabled},
        </if>
        <if test="isMandatory !=null and isMandatory !='' ">
            isMandatory = #{isMandatory},
        </if>
        <if test="unit !=null and unit !='' ">
            unit = #{unit},
        </if>
        <if test="fieldLength !=null and fieldLength !='' ">
            fieldLength = #{fieldLength},
        </if>
        <if test="entryForm !=null and entryForm !='' ">
            entryForm = #{entryForm},
        </if>
        <if test="enableLocation !=null and enableLocation !='' ">
            enableLocation = #{enableLocation},
        </if>
        <if test="groupName !=null and groupName !='' ">
            groupName = #{groupName},
        </if>
        <if test="modificationOptions !=null and modificationOptions !='' ">
            modificationOptions = #{modificationOptions},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

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

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

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

        <if test="fieldName !=null and fieldName !='' ">
            fieldName,
        </if>
        <if test="isEnabled !=null and isEnabled !='' ">
            isEnabled,
        </if>
        <if test="isMandatory !=null and isMandatory !='' ">
            isMandatory,
        </if>
        <if test="unit !=null and unit !='' ">
            unit,
        </if>
        <if test="fieldLength !=null and fieldLength !='' ">
            fieldLength,
        </if>
        <if test="entryForm !=null and entryForm !='' ">
            entryForm,
        </if>
        <if test="enableLocation !=null and enableLocation !='' ">
            enableLocation,
        </if>
        <if test="groupName !=null and groupName !='' ">
            groupName,
        </if>
        <if test="modificationOptions !=null and modificationOptions !='' ">
            modificationOptions,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="fieldName !=null and fieldName !='' ">
             #{fieldName},
        </if>
        <if test="isEnabled !=null and isEnabled !='' ">
             #{isEnabled},
        </if>
        <if test="isMandatory !=null and isMandatory !='' ">
             #{isMandatory},
        </if>
        <if test="unit !=null and unit !='' ">
             #{unit},
        </if>
        <if test="fieldLength !=null and fieldLength !='' ">
             #{fieldLength},
        </if>
        <if test="entryForm !=null and entryForm !='' ">
             #{entryForm},
        </if>
        <if test="enableLocation !=null and enableLocation !='' ">
             #{enableLocation},
        </if>
        <if test="groupName !=null and groupName !='' ">
             #{groupName},
        </if>
        <if test="modificationOptions !=null and modificationOptions !='' ">
             #{modificationOptions},
        </if>
        </trim>

    </insert>

</mapper>
