select
sc.channel_id,
sc.name,
sc.code,
sc.enabled,
sc.cost_rate,
sc.picture,
sc.merchant_id,
sc.api_v3_key,
sc.notify_url,
sc.private_key_path,
sc.merchant_serial_number,
sc.refund_notify_url
from et_channel sc
and sc.name like concat('%', #{query.name}, '%')
and sc.enabled = #{query.enabled}
and sc.channel_id in
#{item}
insert into et_channel
channel_id,
`name`,
`code`,
enabled,
cost_rate,
picture,
#{channelId},
#{name},
#{code},
#{enabled},
#{costRate},
#{picture},
update et_channel
name = #{data.name},
code = #{data.code},
enabled = #{data.enabled},
cost_rate = #{data.costRate},
picture = #{data.picture},
merchant_id = #{data.merchantId},
api_v3_key = #{data.apiV3Key},
notify_url = #{data.notifyUrl},
private_key_path = #{data.privateKeyPath},
merchant_serial_number = #{data.merchantSerialNumber},
refund_notify_url = #{data.refundNotifyUrl},
where channel_id = #{data.channelId}
delete from et_channel where channel_id = #{channelId}
delete from et_channel where channel_id in
#{channelId}