insert into business_resource_supplier(supplier_name, create_user_id, address, contact_name, rs_id,
create_user_name, remark, store_id, account_bank, operate, tel,
bank_account_number, b_id)
values (#{supplierName}, #{createUserId}, #{address}, #{contactName}, #{rsId}, #{createUserName}, #{remark},
#{storeId}, #{accountBank}, #{operate}, #{tel}, #{bankAccountNumber}, #{bId})
insert into resource_supplier(
supplier_name,create_user_id,address,contact_name,rs_id,create_user_name,status_cd,remark,store_id,account_bank,tel,bank_account_number,b_id
) select
t.supplier_name,t.create_user_id,t.address,t.contact_name,t.rs_id,t.create_user_name,'0',t.remark,t.store_id,t.account_bank,t.tel,t.bank_account_number,t.b_id
from business_resource_supplier t where 1=1
and t.supplier_name= #{supplierName}
and t.create_user_id= #{createUserId}
and t.address= #{address}
and t.contact_name= #{contactName}
and t.rs_id= #{rsId}
and t.create_user_name= #{createUserName}
and t.remark= #{remark}
and t.store_id= #{storeId}
and t.account_bank= #{accountBank}
and t.operate= 'ADD'
and t.tel= #{tel}
and t.bank_account_number= #{bankAccountNumber}
and t.b_id= #{bId}
update resource_supplier t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.supplier_name= #{supplierName}
, t.create_user_id= #{createUserId}
, t.address= #{address}
, t.contact_name= #{contactName}
, t.create_user_name= #{createUserName}
, t.remark= #{remark}
, t.store_id= #{storeId}
, t.account_bank= #{accountBank}
, t.tel= #{tel}
, t.bank_account_number= #{bankAccountNumber}
where 1=1
and t.rs_id= #{rsId}
and t.b_id= #{bId}