diff --git a/ruoyi-ccdi/src/main/resources/mapper/ccdi/CcdiBizIntermediaryMapper.xml b/ruoyi-ccdi/src/main/resources/mapper/ccdi/CcdiBizIntermediaryMapper.xml index 0225943..ed52af3 100644 --- a/ruoyi-ccdi/src/main/resources/mapper/ccdi/CcdiBizIntermediaryMapper.xml +++ b/ruoyi-ccdi/src/main/resources/mapper/ccdi/CcdiBizIntermediaryMapper.xml @@ -52,4 +52,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + INSERT INTO ccdi_biz_intermediary ( + biz_id, person_type, person_sub_type, relation_type, + name, gender, id_type, person_id, mobile, wechat_no, + contact_address, company, social_credit_code, position, + related_num_id, data_source, remark, + created_by, updated_by, create_time, update_time + ) VALUES + + ( + #{item.bizId}, #{item.personType}, #{item.personSubType}, #{item.relationType}, + #{item.name}, #{item.gender}, #{item.idType}, #{item.personId}, #{item.mobile}, #{item.wechatNo}, + #{item.contactAddress}, #{item.company}, #{item.socialCreditCode}, #{item.position}, + #{item.relatedNumId}, #{item.dataSource}, #{item.remark}, + #{item.createdBy}, #{item.updatedBy}, #{item.createTime}, #{item.updateTime} + ) + + ON DUPLICATE KEY UPDATE + name = IF(VALUES(name) IS NOT NULL AND VALUES(name) != '', VALUES(name), name), + gender = IF(VALUES(gender) IS NOT NULL AND VALUES(gender) != '', VALUES(gender), gender), + id_type = IF(VALUES(id_type) IS NOT NULL AND VALUES(id_type) != '', VALUES(id_type), id_type), + mobile = IF(VALUES(mobile) IS NOT NULL AND VALUES(mobile) != '', VALUES(mobile), mobile), + wechat_no = IF(VALUES(wechat_no) IS NOT NULL AND VALUES(wechat_no) != '', VALUES(wechat_no), wechat_no), + contact_address = IF(VALUES(contact_address) IS NOT NULL AND VALUES(contact_address) != '', VALUES(contact_address), contact_address), + company = IF(VALUES(company) IS NOT NULL AND VALUES(company) != '', VALUES(company), company), + social_credit_code = IF(VALUES(social_credit_code) IS NOT NULL AND VALUES(social_credit_code) != '', VALUES(social_credit_code), social_credit_code), + position = IF(VALUES(position) IS NOT NULL AND VALUES(position) != '', VALUES(position), position), + related_num_id = IF(VALUES(related_num_id) IS NOT NULL AND VALUES(related_num_id) != '', VALUES(related_num_id), related_num_id), + relation_type = IF(VALUES(relation_type) IS NOT NULL AND VALUES(relation_type) != '', VALUES(relation_type), relation_type), + person_type = IF(VALUES(person_type) IS NOT NULL AND VALUES(person_type) != '', VALUES(person_type), person_type), + person_sub_type = IF(VALUES(person_sub_type) IS NOT NULL AND VALUES(person_sub_type) != '', VALUES(person_sub_type), person_sub_type), + data_source = IF(VALUES(data_source) IS NOT NULL AND VALUES(data_source) != '', VALUES(data_source), data_source), + remark = IF(VALUES(remark) IS NOT NULL, VALUES(remark), remark), + update_time = NOW(), + update_by = VALUES(updated_by) + +