You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
2.7 KiB
51 lines
2.7 KiB
FROM_SELL_ADD_GET_SHOW_SQL = '''SELECT cms.cinema_movie_show_id AS show_id, |
|
cms.cinema_movie_name AS name, |
|
cms.cinema_movie_show_start_time AS start_time, |
|
chi.cinema_hall_name AS hall_name |
|
FROM cinema_movie_show cms |
|
LEFT JOIN cinema_hall_info chi ON cms.cinema_hall_id = chi.cinema_hall_id |
|
WHERE cms.cinema_movie_show_id IN |
|
(SELECT csa.cinema_sell_add_showid |
|
FROM cinema_sell_add csa |
|
WHERE csa.type = 2 |
|
AND zz_audit_status IN (3, 5) |
|
GROUP BY cinema_sell_add_showid) |
|
ORDER BY cms.cinema_movie_show_id; |
|
''' |
|
|
|
FROM_REFUND_GET_SHOW_SQL = '''SELECT cms.cinema_movie_show_id AS show_id, |
|
cms.cinema_movie_name AS name, |
|
cms.cinema_movie_show_start_time AS start_time, |
|
chi.cinema_hall_name AS hall_name |
|
FROM cinema_movie_show cms |
|
LEFT JOIN cinema_hall_info chi ON cms.cinema_hall_id = chi.cinema_hall_id |
|
WHERE cms.cinema_movie_show_id IN (SELECT cro.show_id |
|
FROM cine.cinema_refund_order cro |
|
WHERE cro.refund_order_id in (SELECT crod.refund_order_id |
|
FROM cinema_refund_order_detail crod |
|
WHERE crod.refund_status IN (0, 1, 2)) |
|
GROUP BY cro.show_id) |
|
ORDER BY cms.cinema_movie_show_id DESC;''' |
|
|
|
UPDATE_ZZ_PLATFORM_HOST_SQL = '''UPDATE cine.cinema_common_info |
|
SET cinema_common_info_val = %s WHERE cinema_common_info_key = 'zz_platform_host';''' |
|
|
|
|
|
GET_ZZ_PLATFORM_HOST_SQL = '''SELECT * FROM cine.cinema_common_info WHERE cinema_common_info_key = 'zz_platform_host';''' |
|
|
|
GET_OVERTIME_SELL_TICKET_SQL = """SELECT csad.id, |
|
csad.ticket_no AS ticket_no, |
|
csa.cinema_sell_add_status AS add_status, |
|
csa.zz_audit_status AS audit_status, |
|
csa.cinema_sell_add_showid AS show_id |
|
FROM cinema_sell_add_detail csad |
|
LEFT JOIN cinema_sell_add csa ON csad.cinema_sell_add_id = csa.cinema_sell_add_id |
|
WHERE csad.ticket_no <> '' |
|
AND csa.cinema_sell_add_showid = %s |
|
ORDER BY csad.id DESC;""" |
|
|
|
GET_OVERTIME_REFUND_TICKET_SQL = """SELECT crod.id, crod.cinema_sell_id, crod.refund_status, cslei.ticket_no |
|
FROM cinema_refund_order_detail crod |
|
LEFT JOIN cinema_sell_log_ext_info cslei ON crod.cinema_sell_id = cslei.cinema_sell_id |
|
WHERE refund_order_id IN (SELECT cinema_refund_order.refund_order_id FROM cinema_refund_order WHERE show_id = %s) |
|
ORDER BY id DESC;""" |