LEFT JOIN sys_user s on s.user_name=a.create_by select a.cus_id, a.cus_code, a.cus_name, a.cus_sap_code, a.cus_street, a.cus_payment_terms, a.cus_phone_number, a.cus_industry_code, 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_state, a.cus_approval_status,a.create_time,s.nick_name create_name from customer a insert into customer cus_code, cus_name, cus_sap_code, cus_street, cus_payment_terms, cus_phone_number, cus_industry_code, 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_state, cus_approval_status, create_by, create_time #{cusCode}, #{cusName}, #{cusSapCode}, #{cusStreet}, #{cusPaymentTerms}, #{cusPhoneNumber}, #{cusIndustryCode}, #{cusGroup}, #{cusVatNo}, #{cusType}, #{cusCountry}, #{cusLanguage}, #{cusLabel}, #{cusClassification}, #{cusReceivingEmail}, #{cusRecipient}, #{cusRecipientPhone}, #{cusRemark}, #{cusState}, #{cusApprovalStatus}, #{createBy}, getdate() update customer cus_code = #{cusCode}, cus_name = #{cusName}, cus_sap_code = #{cusSapCode}, cus_street = #{cusStreet}, cus_payment_terms = #{cusPaymentTerms}, cus_phone_number = #{cusPhoneNumber}, cus_industry_code = #{cusIndustryCode}, 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_state = #{cusState}, cus_approval_status = #{cusApprovalStatus}, update_by = #{updateBy}, update_time = getdate() 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_name, bank_account, cus_id) values ( #{item.bankName}, #{item.bankAccount}, #{item.cusId})