|
|
|
@ -12,6 +12,34 @@ def handle_session_code(session_code): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get(cinema_data, request): |
|
|
|
|
# 获取审核状态 |
|
|
|
|
audit_config = ZZMockModel.objects.filter(ip=cinema_data.ip).first() |
|
|
|
|
target_show_id = audit_config.auditShowId |
|
|
|
|
target_status = audit_config.auditStatus |
|
|
|
|
# 获取请求数据 |
|
|
|
|
session_code = request.GET.get('sessionCode') |
|
|
|
|
overtime_type = request.GET.get('overtimeType') |
|
|
|
|
req_show_id = handle_session_code(session_code) |
|
|
|
|
|
|
|
|
|
print(target_show_id, target_status, session_code, overtime_type) |
|
|
|
|
return handler(cinema_data, target_show_id, target_status, req_show_id, overtime_type) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_json(cinema_data, request): |
|
|
|
|
# type_dict = { |
|
|
|
|
# '1': |
|
|
|
|
# '2': |
|
|
|
|
# } |
|
|
|
|
# 获取请求参数 |
|
|
|
|
target_show_id = req_show_id = request.GET.get('show') |
|
|
|
|
overtime_type = request.GET.get('type') |
|
|
|
|
target_status = request.GET.get('status') |
|
|
|
|
|
|
|
|
|
print(target_show_id, target_status, req_show_id, overtime_type) |
|
|
|
|
return handler(cinema_data, target_show_id, target_status, req_show_id, overtime_type) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def handler(cinema_data, target_show_id, target_status, req_show_id, overtime_type): |
|
|
|
|
# 审核状态映射 |
|
|
|
|
# 退票状态 1-未提交 2-审核中 3-审核通过 4-审核失败 |
|
|
|
|
# 售票状态 1-已审核 2-已驳回 3-审核中 4-已补登 5-未提交 6-提交失败 |
|
|
|
@ -35,31 +63,15 @@ def get(cinema_data, request): |
|
|
|
|
'connect_timeout': 5, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
# 获取审核状态 |
|
|
|
|
audit_config = ZZMockModel.objects.filter(ip=cinema_data.ip).first() |
|
|
|
|
target_show_id = audit_config.auditShowId |
|
|
|
|
target_status = audit_config.auditStatus |
|
|
|
|
|
|
|
|
|
# 获取请求数据 |
|
|
|
|
session_code = request.GET.get('sessionCode') |
|
|
|
|
overtime_type = request.GET.get('overtimeType') |
|
|
|
|
|
|
|
|
|
print(target_show_id, target_status, session_code, overtime_type) |
|
|
|
|
|
|
|
|
|
# session_code转show_id |
|
|
|
|
if len(session_code) == 16: |
|
|
|
|
request_show_id = handle_session_code(session_code) |
|
|
|
|
else: |
|
|
|
|
request_show_id = session_code |
|
|
|
|
|
|
|
|
|
# 如果不是要测试的场次直接返回None, 从而执行bypass |
|
|
|
|
if request_show_id != target_show_id: |
|
|
|
|
if req_show_id != target_show_id: |
|
|
|
|
print('不相同') |
|
|
|
|
return None |
|
|
|
|
|
|
|
|
|
db_conn = pymysql.Connect(**db_config) |
|
|
|
|
db_cursor = db_conn.cursor(cursor=DictCursor) |
|
|
|
|
ticket_list = [] |
|
|
|
|
# 处理过场收票 |
|
|
|
|
# 处理过场售票 |
|
|
|
|
|
|
|
|
|
if overtime_type == '0': |
|
|
|
|
# zz_audit_status 专资审核状态 1-已审核 2-已驳回 3-审核中 4-已补登 5-未提交 6-提交失败 |
|
|
|
@ -104,7 +116,7 @@ def get(cinema_data, request): |
|
|
|
|
'operation': 2, |
|
|
|
|
'status': refund_status_dict[refund_status] |
|
|
|
|
}) |
|
|
|
|
print(ticket_list) |
|
|
|
|
print('ticket_list', ticket_list) |
|
|
|
|
mock_data = {'message': '操作成功', |
|
|
|
|
'data': {'ticketList': ticket_list}, |
|
|
|
|
'code': '200', |
|
|
|
|