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

    <select id="selectSMdyyglMdygxxStoreemployeeinfoList" parameterType="pd" resultType="pd">
        select * from s_mdyygl_mdygxx_storeemployeeinfo where 1=1
        <if test="sequenceNumber !=null and sequenceNumber !='' ">
            and sequenceNumber = #{sequenceNumber}
        </if>
        <if test="storeName !=null and storeName !='' ">
            and storeName = #{storeName}
        </if>
        <if test="jdDate !=null and jdDate !='' ">
            and jdDate = #{jdDate}
        </if>
        <if test="employeeCode !=null and employeeCode !='' ">
            and employeeCode = #{employeeCode}
        </if>
        <if test="employeeName !=null and employeeName !='' ">
            and employeeName = #{employeeName}
        </if>
        <if test="departmentId !=null and departmentId !='' ">
            and departmentId = #{departmentId}
        </if>
        <if test="storeCode !=null and storeCode !='' ">
            and storeCode = #{storeCode}
        </if>
        <if test="birthDate !=null and birthDate !='' ">
            and birthDate = #{birthDate}
        </if>
        <if test="contactNumber !=null and contactNumber !='' ">
            and contactNumber = #{contactNumber}
        </if>
        <if test="nationality !=null and nationality !='' ">
            and nationality = #{nationality}
        </if>
        <if test="certificateNumber !=null and certificateNumber !='' ">
            and certificateNumber = #{certificateNumber}
        </if>
        <if test="qualificationCertificate !=null and qualificationCertificate !='' ">
            and qualificationCertificate = #{qualificationCertificate}
        </if>
        <if test="position !=null and position !='' ">
            and position = #{position}
        </if>
        <if test="graduationInstitution !=null and graduationInstitution !='' ">
            and graduationInstitution = #{graduationInstitution}
        </if>
        <if test="major !=null and major !='' ">
            and major = #{major}
        </if>
        <if test="educationalSpecialty !=null and educationalSpecialty !='' ">
            and educationalSpecialty = #{educationalSpecialty}
        </if>
        <if test="id !=null and id !='' ">
            and id = #{id}
        </if>
    </select>


    <update id="updateSMdyyglMdygxxStoreemployeeinfo" parameterType="pd" >
        update s_mdyygl_mdygxx_storeemployeeinfo
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="sequenceNumber !=null and sequenceNumber !='' ">
            sequenceNumber = #{sequenceNumber},
        </if>
        <if test="storeName !=null and storeName !='' ">
            storeName = #{storeName},
        </if>
        <if test="jdDate !=null and jdDate !='' ">
            jdDate = #{jdDate},
        </if>
        <if test="employeeCode !=null and employeeCode !='' ">
            employeeCode = #{employeeCode},
        </if>
        <if test="employeeName !=null and employeeName !='' ">
            employeeName = #{employeeName},
        </if>
        <if test="departmentId !=null and departmentId !='' ">
            departmentId = #{departmentId},
        </if>
        <if test="storeCode !=null and storeCode !='' ">
            storeCode = #{storeCode},
        </if>
        <if test="birthDate !=null and birthDate !='' ">
            birthDate = #{birthDate},
        </if>
        <if test="contactNumber !=null and contactNumber !='' ">
            contactNumber = #{contactNumber},
        </if>
        <if test="nationality !=null and nationality !='' ">
            nationality = #{nationality},
        </if>
        <if test="certificateNumber !=null and certificateNumber !='' ">
            certificateNumber = #{certificateNumber},
        </if>
        <if test="qualificationCertificate !=null and qualificationCertificate !='' ">
            qualificationCertificate = #{qualificationCertificate},
        </if>
        <if test="position !=null and position !='' ">
            position = #{position},
        </if>
        <if test="graduationInstitution !=null and graduationInstitution !='' ">
            graduationInstitution = #{graduationInstitution},
        </if>
        <if test="major !=null and major !='' ">
            major = #{major},
        </if>
        <if test="educationalSpecialty !=null and educationalSpecialty !='' ">
            educationalSpecialty = #{educationalSpecialty},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

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

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

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

        <if test="sequenceNumber !=null and sequenceNumber !='' ">
            sequenceNumber,
        </if>
        <if test="storeName !=null and storeName !='' ">
            storeName,
        </if>
        <if test="jdDate !=null and jdDate !='' ">
            jdDate,
        </if>
        <if test="employeeCode !=null and employeeCode !='' ">
            employeeCode,
        </if>
        <if test="employeeName !=null and employeeName !='' ">
            employeeName,
        </if>
        <if test="departmentId !=null and departmentId !='' ">
            departmentId,
        </if>
        <if test="storeCode !=null and storeCode !='' ">
            storeCode,
        </if>
        <if test="birthDate !=null and birthDate !='' ">
            birthDate,
        </if>
        <if test="contactNumber !=null and contactNumber !='' ">
            contactNumber,
        </if>
        <if test="nationality !=null and nationality !='' ">
            nationality,
        </if>
        <if test="certificateNumber !=null and certificateNumber !='' ">
            certificateNumber,
        </if>
        <if test="qualificationCertificate !=null and qualificationCertificate !='' ">
            qualificationCertificate,
        </if>
        <if test="position !=null and position !='' ">
            position,
        </if>
        <if test="graduationInstitution !=null and graduationInstitution !='' ">
            graduationInstitution,
        </if>
        <if test="major !=null and major !='' ">
            major,
        </if>
        <if test="educationalSpecialty !=null and educationalSpecialty !='' ">
            educationalSpecialty,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="sequenceNumber !=null and sequenceNumber !='' ">
             #{sequenceNumber},
        </if>
        <if test="storeName !=null and storeName !='' ">
             #{storeName},
        </if>
        <if test="jdDate !=null and jdDate !='' ">
             #{jdDate},
        </if>
        <if test="employeeCode !=null and employeeCode !='' ">
             #{employeeCode},
        </if>
        <if test="employeeName !=null and employeeName !='' ">
             #{employeeName},
        </if>
        <if test="departmentId !=null and departmentId !='' ">
             #{departmentId},
        </if>
        <if test="storeCode !=null and storeCode !='' ">
             #{storeCode},
        </if>
        <if test="birthDate !=null and birthDate !='' ">
             #{birthDate},
        </if>
        <if test="contactNumber !=null and contactNumber !='' ">
             #{contactNumber},
        </if>
        <if test="nationality !=null and nationality !='' ">
             #{nationality},
        </if>
        <if test="certificateNumber !=null and certificateNumber !='' ">
             #{certificateNumber},
        </if>
        <if test="qualificationCertificate !=null and qualificationCertificate !='' ">
             #{qualificationCertificate},
        </if>
        <if test="position !=null and position !='' ">
             #{position},
        </if>
        <if test="graduationInstitution !=null and graduationInstitution !='' ">
             #{graduationInstitution},
        </if>
        <if test="major !=null and major !='' ">
             #{major},
        </if>
        <if test="educationalSpecialty !=null and educationalSpecialty !='' ">
             #{educationalSpecialty},
        </if>
        </trim>

    </insert>

</mapper>
