select
scw.channel_id,
scw.name,
scw.handling_charge_type,
scw.withdraw_handling_charge,
scw.enabled,
scw.cost_rate,
scw.picture,
scw.min_amount,
scw.max_amount,
scw.is_need_code
from rl_channel_withdraw scw
and scw.channel_id = #{query.channelId}
and scw.name like concat('%', #{query.name}, '%')
and scw.handling_charge_type = #{query.handlingChargeType}
and scw.enabled = #{query.enabled}
insert into rl_channel_withdraw
name,
handling_charge_type,
withdraw_handling_charge,
enabled,
cost_rate,
picture,
min_amount,
max_amount,
is_need_code,
#{name},
#{handlingChargeType},
#{withdrawHandlingCharge},
#{enabled},
#{costRate},
#{picture},
#{minAmount},
#{maxAmount},
#{isNeedCode},
update rl_channel_withdraw
name = #{data.name},
handling_charge_type = #{data.handlingChargeType},
withdraw_handling_charge = #{data.withdrawHandlingCharge},
enabled = #{data.enabled},
cost_rate = #{data.costRate},
picture = #{data.picture},
min_amount = #{data.minAmount},
max_amount = #{data.maxAmount},
is_need_code = #{data.isNeedCode},
where channel_id = #{data.channelId}
delete from rl_channel_withdraw where channel_id = #{channelId}
delete from rl_channel_withdraw where channel_id in
#{channelId}