select id, company, source_sale_id, sale_id, info_flow, next_time, wx_name, phone, debt_type, debt_money, source_type, source_app, wx_account, customer_status, customer_level, touch_qrcode, contact_number, is_touch, is_add_wx, is_effective, is_plan, is_deal, pool_status, catch_time, province_name, city_name, customer_name, contact_time, other_phone, create_time, create_by, update_by, update_time, remark, customer_remark,two_customer_remark,assign_times from clew insert into clew company, sale_id, info_flow, next_time, wx_name, phone, debt_type, debt_money, source_type, source_app, wx_account, customer_status, customer_level, touch_qrcode, contact_number, is_touch, is_add_wx, is_effective, is_plan, is_deal, pool_status, catch_time, province_name, city_name, customer_name, contact_time, other_phone, create_time, create_by, update_by, update_time, remark, #{company}, #{saleId}, #{infoFlow}, #{nextTime}, #{wxName}, #{phone}, #{debtType}, #{debtMoney}, #{sourceType}, #{sourceApp}, #{wxAccount}, #{customerStatus}, #{customerLevel}, #{touchQrcode}, #{contactNumber}, #{isTouch}, #{isAddWx}, #{isEffective}, #{isPlan}, #{isDeal}, #{poolStatus}, #{catchTime}, #{provinceName}, #{cityName}, #{customerName}, #{contactTime}, #{otherPhone}, #{createTime}, #{createBy}, #{updateBy}, #{updateTime}, #{remark}, update clew company = #{company}, source_sale_id = sale_id, sale_id = #{saleId}, info_flow = #{infoFlow}, next_time = #{nextTime}, wx_name = #{wxName}, phone = #{phone}, debt_type = #{debtType}, debt_money = #{debtMoney}, source_type = #{sourceType}, source_app = #{sourceApp}, wx_account = #{wxAccount}, customer_status = #{customerStatus}, customer_level = #{customerLevel}, touch_qrcode = #{touchQrcode}, contact_number = #{contactNumber}, is_touch = #{isTouch}, is_add_wx = #{isAddWx}, is_effective = #{isEffective}, is_plan = #{isPlan}, is_deal = #{isDeal}, pool_status = #{poolStatus}, catch_time = #{catchTime}, province_name = #{provinceName}, city_name = #{cityName}, customer_name = #{customerName}, contact_time = #{contactTime}, other_phone = #{otherPhone}, create_time = #{createTime}, create_by = #{createBy}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, customer_remark = #{customerRemark}, two_customer_remark = #{twoCustomerRemark}, assign_times = #{assignTimes}, where id = #{id} update clew source_sale_id = sale_id, sale_id = #{saleId}, update_time = #{updateTime}, assign_times = #{assignTimes}, and id in #{id} delete from clew where id = #{id} delete from clew where id in #{id} update clew set update_time = sysdate(), source_sale_id = sale_id, sale_id = 2 where is_deal = 0 and is_add_wx != 1 and sale_id != 2 and update_time <= #{beginTime} update clew set update_time = sysdate(), source_sale_id = sale_id, sale_id = 2 where is_deal = 0 and is_add_wx = 1 and sale_id != 2 and update_time <= #{beginTime}