LEFT JOIN sys_user u on u.user_name=a.create_by
LEFT JOIN sys_dept d on u.dept_id = d.dept_id
select a.cus_id, a.cus_code, a.cus_name, a.cus_sap_code, a.cus_street, a.cus_qcc_street,a.cus_payment_terms, a.cus_phone_number,
a.cus_industry_code, a.cus_industry_code_qcc, a.cus_group, a.cus_vat_no, a.cus_type, a.cus_country, a.cus_language, a.cus_label,
a.cus_classification, a.cus_receiving_email, a.cus_recipient, a.cus_recipient_phone, a.cus_remark,a.cus_return_remark,
a.cus_state, a.cus_approval_status,a.cus_salesman,a.create_time,u.nick_name create_name,
a.cus_sales_organization,a.cus_distribution_channel,a.cus_sales_territory,a.cus_sale_office,
a.cus_currency,a.cus_tax,a.cus_reconciliation_account,a.cus_account_allocation_group
from customer a
insert into customer
cus_id,
cus_code,
cus_name,
cus_sap_code,
cus_street,
cus_qcc_street,
cus_payment_terms,
cus_phone_number,
cus_industry_code,
cus_industry_code_qcc,
cus_group,
cus_vat_no,
cus_type,
cus_country,
cus_language,
cus_label,
cus_classification,
cus_receiving_email,
cus_recipient,
cus_recipient_phone,
cus_remark,
cus_return_remark,
cus_state,
cus_approval_status,
cus_salesman,
create_by,
create_time,
update_by,
update_time,
cus_sales_organization,
cus_distribution_channel,
cus_sales_territory,
cus_sale_office,
cus_currency,
cus_tax,
cus_reconciliation_account,
cus_account_allocation_group,
#{cusId},
#{cusCode},
#{cusName},
#{cusSapCode},
#{cusStreet},
#{cusQccStreet},
#{cusPaymentTerms},
#{cusPhoneNumber},
#{cusIndustryCode},
#{cusIndustryCodeQcc},
#{cusGroup},
#{cusVatNo},
#{cusType},
#{cusCountry},
#{cusLanguage},
#{cusLabel},
#{cusClassification},
#{cusReceivingEmail},
#{cusRecipient},
#{cusRecipientPhone},
#{cusRemark},
#{cusReturnRemark},
#{cusState},
#{cusApprovalStatus},
#{cusSalesman},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{cusSalesOrganization},
#{cusDistributionChannel},
#{cusSalesTerritory},
#{cusSaleOffice},
#{cusCurrency},
#{cusTax},
#{cusReconciliationAccount},
#{cusAccountAllocationGroup},
update customer
cus_code = #{cusCode},
cus_name = #{cusName},
cus_sap_code = #{cusSapCode},
cus_street = #{cusStreet},
cus_qcc_street = #{cusQccStreet},
cus_payment_terms = #{cusPaymentTerms},
cus_phone_number = #{cusPhoneNumber},
cus_industry_code = #{cusIndustryCode},
cus_industry_code_qcc = #{cusIndustryCodeQcc},
cus_group = #{cusGroup},
cus_vat_no = #{cusVatNo},
cus_type = #{cusType},
cus_country = #{cusCountry},
cus_language = #{cusLanguage},
cus_label = #{cusLabel},
cus_classification = #{cusClassification},
cus_receiving_email = #{cusReceivingEmail},
cus_recipient = #{cusRecipient},
cus_recipient_phone = #{cusRecipientPhone},
cus_remark = #{cusRemark},
cus_return_remark = #{cusReturnRemark},
cus_state = #{cusState},
cus_approval_status = #{cusApprovalStatus},
cus_salesman = #{cusSalesman},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
cus_sales_organization = #{cusSalesOrganization},
cus_distribution_channel = #{cusDistributionChannel},
cus_sales_territory = #{cusSalesTerritory},
cus_sale_office = #{cusSaleOffice},
cus_currency = #{cusCurrency},
cus_tax = #{cusTax},
cus_reconciliation_account = #{cusReconciliationAccount},
cus_account_allocation_group = #{cusAccountAllocationGroup},
where cus_id = #{cusId}
delete from customer where cus_id = #{cusId}
delete from customer where cus_id in
#{cusId}
delete from bank where cus_id in
#{cusId}
delete from bank where cus_id = #{cusId}
insert into bank(bank_id, bank_name, bank_account, cus_id,bank_code,bank_country) values
( #{item.bankId}, #{item.bankName}, #{item.bankAccount}, #{item.cusId}, #{item.bankCode}, #{item.bankCountry})