48 lines
2.1 KiB
XML
48 lines
2.1 KiB
XML
<?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="com.bms.customer.supplierinfo.mapper.SupplierSyncMapper">
|
|
|
|
<select id="selectExistingCodes" resultType="java.lang.String">
|
|
SELECT supplier_code FROM sup_supplier WHERE del_flag = '0'
|
|
</select>
|
|
|
|
<insert id="insertSyncSupplier" parameterType="com.bms.customer.supplierinfo.domain.BmsSupplier">
|
|
INSERT INTO sup_supplier (
|
|
supplier_code, supplier_name, is_enable, del_flag, create_by
|
|
<if test="supplierType != null">, supplier_type</if>
|
|
<if test="invoiceType != null">, invoice_type</if>
|
|
<if test="kacheType != null">, kache_type</if>
|
|
<if test="ed != null">, ed</if>
|
|
<if test="zq != null">, zq</if>
|
|
<if test="remark != null">, remark</if>
|
|
<if test="createTime != null">, create_time</if>
|
|
) VALUES (
|
|
#{supplierCode}, #{supplierName}, #{isEnable}, '0', #{createBy}
|
|
<if test="supplierType != null">, #{supplierType}</if>
|
|
<if test="invoiceType != null">, #{invoiceType}</if>
|
|
<if test="kacheType != null">, #{kacheType}</if>
|
|
<if test="ed != null">, #{ed}</if>
|
|
<if test="zq != null">, #{zq}</if>
|
|
<if test="remark != null">, #{remark}</if>
|
|
<if test="createTime != null">, #{createTime}</if>
|
|
)
|
|
</insert>
|
|
|
|
<update id="updateSyncSupplierByCode" parameterType="com.bms.customer.supplierinfo.domain.BmsSupplier">
|
|
UPDATE sup_supplier
|
|
SET supplier_name = #{supplierName}
|
|
, is_enable = #{isEnable}
|
|
, supplier_type = #{supplierType}
|
|
, invoice_type = #{invoiceType}
|
|
, kache_type = #{kacheType}
|
|
<if test="ed != null">, ed = #{ed}</if>
|
|
<if test="zq != null">, zq = #{zq}</if>
|
|
<if test="remark != null">, remark = #{remark}</if>
|
|
, update_by = #{updateBy}
|
|
, update_time = #{updateTime}
|
|
WHERE supplier_code = #{supplierCode} AND del_flag = '0'
|
|
</update>
|
|
</mapper>
|