#----                   订单关闭
goblin_order.close.order=UPDATE goblin_store_order SET status = ? ,updated_at = ? , cancel_time = ? , cancel_reason=?  WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.close.sku=UPDATE goblin_order_sku SET status = ? ,updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_user_coupon.updateState=UPDATE goblin_user_coupon SET state = ? , used_for = ? ,updated_at = ? where ucoupon_id = ?
#-------- NFT -------
goblin_nft_order.update.close=UPDATE goblin_nft_order SET status = ?, updated_at = ?, cancel_time = ?, cancel_reason = ?  WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
#----                   兑换码操作
goblin_activity.code.admin=UPDATE goblin_nft_ex_code SET admin_uid = ?  where code = ?
#----                   关闭票务订单
kylin_order_tickets.close=UPDATE kylin_order_tickets SET updated_at = ? where order_tickets_id = ?
kylin_order_ticket_status.close=UPDATE kylin_order_ticket_status SET status = ? , updated_at = ?  where order_id = ?
kylin_order_ticket_relations.close=UPDATE kylin_order_ticket_relations SET updated_at = ?  where order_id = ?

# ------------------------演出票拼团-未支付关单----------------------------
kylin_group_buy_member.cancel_by_order_tickets=UPDATE kylin_group_buy_member SET status=2 WHERE order_tickets_id=? AND status=-1
kylin_group_buy_order.cancel_if_prepare=UPDATE kylin_group_buy_order SET status=3, current_count=0, updated_at=? WHERE group_order_id=? AND status=-1
kylin_group_buy_order.decr_count_if_pending=UPDATE kylin_group_buy_order SET current_count=current_count-1, updated_at=? WHERE group_order_id=? AND status=0 AND current_count>0
kylin_group_buy_order.delete=DELETE FROM kylin_group_buy_order WHERE group_order_id = ?
kylin_group_buy_order.insert=INSERT INTO kylin_group_buy_order (group_order_id,activity_id,leader_user_id,order_tickets_id,target_count,current_count,status,is_public,share_token,expires_at,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)
kylin_group_buy_member.delete_by_group=DELETE FROM kylin_group_buy_member WHERE group_order_id = ?
kylin_group_buy_member.insert=INSERT INTO kylin_group_buy_member (member_id,group_order_id,user_id,order_tickets_id,ticket_count,status,join_time,created_at) VALUES (?,?,?,?,?,?,?,?)