统一修改ruoyi->bms
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<?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.customerinfo.mapper.CustomerSyncMapper">
|
||||
|
||||
<select id="selectExistingCodes" resultType="java.lang.String">
|
||||
SELECT customer_code FROM ctr_customer WHERE del_flag = '0'
|
||||
</select>
|
||||
|
||||
<!-- 字段集与 scripts/import_customers.py 的 MAP_COLUMNS 保持一致;
|
||||
源行为空的字段不写,走数据库默认值 -->
|
||||
<insert id="insertSyncCustomer" parameterType="com.bms.customer.customerinfo.domain.BmsCustomer">
|
||||
INSERT INTO ctr_customer (
|
||||
customer_code, customer_name, is_enable,
|
||||
del_flag, create_by
|
||||
<if test="customerCodeDw != null">, customer_code_dw</if>
|
||||
<if test="customerType != null">, customer_type</if>
|
||||
<if test="salesUserId != null">, sales_user_id</if>
|
||||
<if test="salesUser != null">, sales_user</if>
|
||||
<if test="settlementUser != null">, settlement_user</if>
|
||||
<if test="serviceUser != null">, service_user</if>
|
||||
<if test="settlementType != null">, settlement_type</if>
|
||||
<if test="tempEd != null">, temp_ed</if>
|
||||
<if test="accountBalance != null">, account_balance</if>
|
||||
<if test="foreignCurrencyBalance != null">, foreign_currency_balance</if>
|
||||
<if test="weightThreshold != null">, weight_threshold</if>
|
||||
<if test="creditEd != null">, credit_ed</if>
|
||||
<if test="remark != null">, remark</if>
|
||||
<if test="createTime != null">, create_time</if>
|
||||
) VALUES (
|
||||
#{customerCode}, #{customerName}, #{isEnable},
|
||||
'0', #{createBy}
|
||||
<if test="customerCodeDw != null">, #{customerCodeDw}</if>
|
||||
<if test="customerType != null">, #{customerType}</if>
|
||||
<if test="salesUserId != null">, #{salesUserId}</if>
|
||||
<if test="salesUser != null">, #{salesUser}</if>
|
||||
<if test="settlementUser != null">, #{settlementUser}</if>
|
||||
<if test="serviceUser != null">, #{serviceUser}</if>
|
||||
<if test="settlementType != null">, #{settlementType}</if>
|
||||
<if test="tempEd != null">, #{tempEd}</if>
|
||||
<if test="accountBalance != null">, #{accountBalance}</if>
|
||||
<if test="foreignCurrencyBalance != null">, #{foreignCurrencyBalance}</if>
|
||||
<if test="weightThreshold != null">, #{weightThreshold}</if>
|
||||
<if test="creditEd != null">, #{creditEd}</if>
|
||||
<if test="remark != null">, #{remark}</if>
|
||||
<if test="createTime != null">, #{createTime}</if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateSyncCustomerByCode" parameterType="com.bms.customer.customerinfo.domain.BmsCustomer">
|
||||
UPDATE ctr_customer
|
||||
SET is_enable = #{isEnable}
|
||||
<if test="customerName != null">, customer_name = #{customerName}</if>
|
||||
<if test="customerCodeDw != null">, customer_code_dw = #{customerCodeDw}</if>
|
||||
<if test="customerType != null">, customer_type = #{customerType}</if>
|
||||
<if test="salesUserId != null">, sales_user_id = #{salesUserId}</if>
|
||||
<if test="salesUser != null">, sales_user = #{salesUser}</if>
|
||||
<if test="settlementUser != null">, settlement_user = #{settlementUser}</if>
|
||||
<if test="serviceUser != null">, service_user = #{serviceUser}</if>
|
||||
<if test="settlementType != null">, settlement_type = #{settlementType}</if>
|
||||
<if test="tempEd != null">, temp_ed = #{tempEd}</if>
|
||||
<if test="accountBalance != null">, account_balance = #{accountBalance}</if>
|
||||
<if test="foreignCurrencyBalance != null">, foreign_currency_balance = #{foreignCurrencyBalance}</if>
|
||||
<if test="weightThreshold != null">, weight_threshold = #{weightThreshold}</if>
|
||||
<if test="creditEd != null">, credit_ed = #{creditEd}</if>
|
||||
<if test="remark != null">, remark = #{remark}</if>
|
||||
, update_by = #{updateBy}
|
||||
, update_time = #{updateTime}
|
||||
WHERE customer_code = #{customerCode} AND del_flag = '0'
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user