dingxin_toolbox
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.

18 lines
680 B

def get_ticket_price(data, seat=None, ecard=None):
print('get_ticket_price-data', data)
if data.get('areaInfo') is None:
if data.get('partnerPrice') is None:
return data.get('marketPrice'), None
else:
return data.get('partnerPrice'), None
else:
if seat is None:
return data.get('partnerPrice'), None
else:
area_id = seat.get('areaId')
if ecard is None:
for area in data.get('areaInfo'):
if area.get('areaId') == area_id:
return area.get('areaPrice'), area.get('areaServiceFee')
else:
pass