select
a.id,
a.name,
a.type,
a.manufacture,
a.pay_company,
a.merchant_name,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.del_flag,
a.remark,
a.code,
a.rate,
a.rate_plus,
a.debit_card,
a.merchant_type,
a.merchant_code,
a.activation_date,
bc."name" as bank_name,
bc.code as bank_code
from
pos_machine a
left join bank_card_lend bc on bc.id =a.debit_card
insert into pos_machine
id,name,type,manufacture,pay_company,merchant_name,create_by,create_time,update_by,update_time,del_flag,remark,code,rate,rate_plus,debit_card,merchant_type,merchant_code,activation_date,#{id},#{name},#{type},#{manufacture},#{payCompany},#{merchantName},#{createBy},#{createTime},#{updateBy},#{updateTime},#{delFlag},#{remark},#{code},#{rate},#{ratePlus},#{debitCard},#{merchantType},#{merchantCode},#{activationDate},
update pos_machine
name = #{name},type = #{type},manufacture = #{manufacture},pay_company = #{payCompany},merchant_name = #{merchantName},create_by = #{createBy},create_time = #{createTime},update_by = #{updateBy},update_time = #{updateTime},del_flag = #{delFlag},remark = #{remark},code = #{code},rate = #{rate},rate_plus = #{ratePlus},debit_card = #{debitCard},merchant_type = #{merchantType},merchant_code = #{merchantCode},activation_date = #{activationDate},
where id = #{id}
delete from pos_machine where id = #{id}
delete from pos_machine where id in
#{id}
update pos_machine set del_flag='1' where id = #{id}
update pos_machine set del_flag='1' where id in
#{id}