kylin_order_ticket_entities.updateStatusByStation=UPDATE kylin_order_ticket_entities SET `status`=?,check_client=?,updated_at=? WHERE order_ticket_entities_id=? 

# ------------------------缺票登记(不用考虑并发)----------------------------
kylin_lack_register.insert=INSERT INTO `kylin_lack_registers`(`lack_registers_id` ,`performance_id` ,`ticket_id` ,`user_id` ,`user_name` ,`user_mobile` ,`send_status` ,`ip_address` ,`created_at`)VALUES(? ,? ,? ,? ,? ,? ,? ,? ,?);

# ------------------------创建订单----------------------------
kylin_order_ticket.add=INSERT INTO kylin_order_tickets(order_tickets_id,user_id,user_name,user_mobile,performance_title,order_code,qr_code,order_type,order_version,`number`,price,price_member,price_total,price_voucher,price_actual,price_express,price_refund,refund_number,pay_type,payment_type,time_pay,express_contacts,express_address,express_phone,coupon_type,get_ticket_type,get_ticket_describe,pay_countdown_minute,`comment`,created_at,updated_at,pay_code)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_ticket_relation.add=INSERT INTO kylin_order_ticket_relations(order_ticket_relations_id ,order_id ,transfer_id ,live_id ,agent_id ,is_member ,performance_id ,time_id ,ticket_id ,created_at ,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?)
kylin_order_ticket_status.add=INSERT INTO kylin_order_ticket_status(order_ticket_status_id ,order_id ,express_type ,is_student ,transfer_status ,`status` ,pay_status ,created_at ,updated_at)VALUES(?,?,?,?,?,?,?,?,?)
kylin_order_ticket_entities.add=INSERT INTO kylin_order_ticket_entities(order_ticket_entities_id ,order_id ,ticket_id ,user_id ,time_id ,performance_id ,enter_type ,enter_name ,enter_mobile,enter_id_code,`status`,sys_damai,check_client,is_payment,`comment`,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)

# ------------------------再次支付----------------------------
kylin_order_ticket.payAgain=UPDATE kylin_order_tickets SET  updated_at = ? , pay_code = ?  WHERE order_tickets_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_status.payAgain=UPDATE kylin_order_ticket_status SET updated_at = ?  WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_relation.payAgain=UPDATE kylin_order_ticket_relations SET updated_at = ?  WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_entities.payAgain=UPDATE kylin_order_ticket_entities SET updated_at = ?  WHERE order_id = ? and (updated_at <= ? or created_at = ?)



# ------------------------支付回调----------------------------
kylin_order_ticket.synPay=UPDATE  kylin_order_tickets SET payment_type = ? ,pay_code = ? , time_pay = ?, qr_code = ? , updated_at = ? WHERE order_tickets_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_status.synPay=UPDATE kylin_order_ticket_status SET `status` = ?,pay_status = ?,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_relation.synPay=UPDATE kylin_order_ticket_relations SET updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_entities.synPay=UPDATE kylin_order_ticket_entities SET is_payment = ?,updated_at = ?,sys_damai = 1 WHERE order_id = ? and (updated_at <= ? or created_at = ?)



# ------------------------订单关闭----------------------------
kylin_order_ticket.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_relation.close=UPDATE kylin_order_ticket_relations SET updated_at = ? WHERE order_id = ?



# ------------------------用户发起订单退款----------------------------
kylin_order_ticket_status.refund=UPDATE kylin_order_ticket_status SET status = ? ,updated_at = ?  WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_entities.refund=UPDATE kylin_order_ticket_entities SET is_payment = ? ,updated_at = ?  WHERE order_ticket_entities_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_refund.refund=INSERT INTO kylin_order_refunds (order_refunds_id,order_tickets_id,order_refund_code,price,price_express,status,type,applicant_id,applicant_name,applicant_at,reason,refund_cate,created_at) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_refund_entities.refund=INSERT INTO kylin_order_refund_entities (order_refunds_entities_id,order_refunds_id,refund_price,order_ticket_entities_id,created_at) VALUES(?,?,?,?,?)
kylin_order_refund_pic.refund=INSERT INTO kylin_order_refund_pic (refund_pic_id,order_refunds_id,pic_url,created_at) VALUES (?,?,?,?)

# ------------------------用户发起订单退款撤回----------------------------
kylin_order_ticket_status.withDraw=UPDATE kylin_order_ticket_status SET status = ? ,updated_at = ?  WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_entities.withDraw=UPDATE kylin_order_ticket_entities SET is_payment = ?,updated_at = ?,sys_damai = 1 WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_refund.withDraw=UPDATE kylin_order_refunds SET status = ? ,updated_at = ?  WHERE order_refunds_id = ?

# ------------------------超时支付申请退款----------------------------
kylin_order_ticket_status.overtimeRefund=UPDATE kylin_order_ticket_status SET status = ? ,updated_at = ?  WHERE order_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_ticket_entities.overtimeRefund=UPDATE kylin_order_ticket_entities SET is_payment = ? ,updated_at = ?  WHERE order_ticket_entities_id = ? and (updated_at <= ? or created_at = ?)
kylin_order_refund.overtimeRefund=INSERT INTO kylin_order_refunds (order_refunds_id,order_tickets_id,order_refund_code,price,price_express,status,type,applicant_id,applicant_name,applicant_at,reason,refund_cate,created_at) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_refund_entities.overtimeRefund=INSERT INTO kylin_order_refund_entities (order_refunds_entities_id,order_refunds_id,refund_price,order_ticket_entities_id,created_at) VALUES(?,?,?,?,?)



