`id`,`tenant_id`,`coupon_id`,`coupon_type`,`c_user_id`,`owner_id`,`b_user_id`,`order_id`,`expired_time`,`coupon_order_status`,`create_date`,`update_date`,`coupon_price`, `auto_refund`, `verify_type` where 1 = 1 and `id` = #{id} and `tenant_id` = #{tenantId} and `coupon_id` = #{couponId} and `coupon_type` = #{couponType} and `c_user_id` = #{cUserId} and `owner_id` = #{ownerId} and `b_user_id` = #{bUserId} and `order_id` = #{orderId} and `expired_time` = #{expiredTime} and `coupon_order_status` = #{couponOrderStatus} and `create_date` = #{createDate} and `update_date` = #{updateDate} and `coupon_price` = #{couponPrice} and `auto_refund` = #{autoRefund} and id in #{idItem} order by ${sortColumns} update wx_coupon_order set `coupon_order_status` = #{couponOrderStatus}, `b_user_id` = #{bUserId}, `update_date` = #{updateDate}, `verify_type` = #{verifyType} where `tenant_id`=#{tenantId} and id=#{id} and `b_user_id` is null update wx_coupon_order set `coupon_order_status` = #{couponOrderStatus}, `b_user_id` = #{bUserId}, `update_date` = #{updateDate}, `verify_type` = #{verifyType} where 1=1 and `tenant_id`=#{tenantId} and id=#{id} and `b_user_id` is null and `b_user_id` = #{bUserId} update wx_coupon_order set `coupon_order_status` = #{couponOrderStatus}, `b_user_id` = #{bUserId}, `update_date` = #{updateDate}, `verify_type` = #{verifyType} where 1=1 and `tenant_id`=#{tenantId} and id=#{id} update wx_coupon_order set `coupon_order_status` = #{couponOrderStatus}, `b_user_id` = null, `update_date` = #{updateDate}, `verify_type` = null where `tenant_id`=#{tenantId} and id=#{id} co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price, c.title,c.sale_price,c.use_price,c.price,c.unit,c.auto_refund,c.business,c.subsidy_type,ms.subsidy subsidy_num, (case when com.mc=1 then (select m.name from wx_merchant m, wx_coupon_merchant cm where m.id = cm.merchant_id and cm.product_id=co.coupon_id and cm.status = 0) else '[多商户通用]' end) as merchant_name, (case when com.mc = 1 then (select m.id from wx_merchant m, wx_coupon_merchant cm where m.id = cm.merchant_id and cm.product_id = co.coupon_id and cm.status = 0) else 0 end) as merchant_id,cu.phone,bu.verify_merchant_name,cal.channel_type co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price, c.type,c.title,c.sale_price,c.use_price,c.price,c.unit,c.auto_refund,c.business,c.subsidy_type,ms.subsidy subsidy_num, bu.name, bu.phone as bphone, cu.phone, m.name as merchant_name,m.id as merchant_id co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price, c.type,c.title,c.sale_price,c.use_price,c.price,c.unit, bu.name, cu.phone co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price, c.type,c.title,c.sale_price,c.use_price,c.price,c.unit, cu.phone co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type, c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.valid_type,c.valid_start_date,c.valid_end_date,c.auto_refund, cal.channel_type as send_channel_type co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type, c.type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.detail,c.remark,c.valid_type,c.valid_start_date,c.valid_end_date,c.auto_refund co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.verify_type co.id,co.coupon_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type, c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit, json_extract(car.vendor_params,'$.id') as coupon_free_id co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.expired_time,co.coupon_order_status,co.create_date,co.update_date, c.cover_img,c.title,c.sub_title,c.detail,c.unit,c.remark, a.amount,a.remaining_amount,a.support_transfer co.id,co.tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price, c.cover_img,c.title,c.sub_title,c.sale_price,c.price,c.unit,c.detail,c.remark, a.amount,a.remaining_amount,a.support_transfer