<?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="org.jeecg.modules.basedata.mapper.FdCustomerContactsMapper">

    <update id="UpdateByPid" parameterType="int">
        update fd_customer_contacts
        <set>
          <if test="contactPsn!=null">
             contact_psn=#{contactPsn}
          </if>
          <if test="telephone!=null">
              ,contect_tel=#{telephone}
          </if>
          <if test="email!=null">
             ,email=#{email}
          </if>
        </set>
        where pk_customer_id=#{pkCustomerId}
    </update>

    <delete id="deletePid" parameterType="int">
        delete from fd_customer_contacts where pk_customer_id = "${pkCustomerId}"
    </delete>

    <select id="customerList" resultType="org.jeecg.modules.basedata.entity.FdCustomerContacts">
        select *from fd_customer_contacts
        where pk_customer_id = #{pid}
    </select>
</mapper>