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, sc.appid from e_channel sc and sc.name like concat('%', #{query.name}, '%') and sc.enabled = #{query.enabled} and sc.channel_id in #{item} insert into e_channel channel_id, `name`, `code`, enabled, cost_rate, picture, #{channelId}, #{name}, #{code}, #{enabled}, #{costRate}, #{picture}, update e_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}, appid = #{data.appid}, where channel_id = #{data.channelId} delete from e_channel where channel_id = #{channelId} delete from e_channel where channel_id in #{channelId}