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.
129 lines
6.5 KiB
129 lines
6.5 KiB
3 months ago
|
from dspt_api.util.api.cinema_hall_seats import ApiCinemaHallSeats
|
||
3 months ago
|
from dspt_api.util.api.cinema_plays_increment import ApiCinemaPlaysIncrement
|
||
3 months ago
|
from dspt_api.util.api.ecard_refund import ApiEcardRefund
|
||
|
from dspt_api.util.api.ecard_regist import ApiEcardRegist
|
||
|
from dspt_api.util.api.ecard_renew import ApiEcardRenew
|
||
3 months ago
|
from dspt_api.util.api.play_info import ApiPlayInfo
|
||
|
from dspt_api.util.api.play_seat_status import ApiPlaySeatStatus
|
||
|
from dspt_api.util.api.play_period_changed_seats import ApiPlayPeriodChangedSeats
|
||
|
from dspt_api.util.api.play_seat_overview import ApiPlaySeatOverview
|
||
|
from dspt_api.util.api.cinema_goods_pic import ApiCinemaGoodsPic
|
||
3 months ago
|
from dspt_api.util.api.seat_lock import ApiSeatLock
|
||
3 months ago
|
from dspt_api.util.api.order_buy_goods import ApiOrderBuyGoods
|
||
3 months ago
|
from dspt_api.util.api.ecard_detail import ApiEcardDetail
|
||
|
from dspt_api.util.api.ecard_order_detail import ApiEcardOrderDetail
|
||
3 months ago
|
from dspt_api.util.api.ecard_seat_price import ApiEcardSeatPrice
|
||
2 months ago
|
from dspt_api.util.api.seat_check_coupon import ApiSeatCheckCoupon
|
||
3 months ago
|
|
||
|
|
||
|
# 通过api来匹配不同的接口文件获取推荐
|
||
|
# 返回推荐参数应该包含参数名,参数值,和是否勾选的状态
|
||
2 months ago
|
def suggest_params(member_type, api, ip, **kwargs):
|
||
3 months ago
|
data = {'member_type': member_type, 'api': api, 'ip': ip}
|
||
|
params = []
|
||
3 months ago
|
# 非会员
|
||
3 months ago
|
if api == 'cinema/hall-seats' and member_type == 'nonmember':
|
||
|
print('cinema/hall-seats')
|
||
|
params = ApiCinemaHallSeats(**data).get_suggestion()
|
||
3 months ago
|
if api == 'cinema/plays-increment' and member_type == 'nonmember':
|
||
|
print('cinema/plays-increment')
|
||
|
params = ApiCinemaPlaysIncrement(**data).get_suggestion()
|
||
3 months ago
|
if api == 'play/info' and member_type == 'nonmember':
|
||
|
print('play/info')
|
||
|
params = ApiPlayInfo(**data).get_suggestion()
|
||
|
if api == 'play/seat-status' and member_type == 'nonmember':
|
||
|
print('play/seat-status')
|
||
|
params = ApiPlaySeatStatus(**data).get_suggestion()
|
||
|
if api == 'play/period-changed-seats' and member_type == 'nonmember':
|
||
|
print('play/period-changed-seats')
|
||
|
params = ApiPlayPeriodChangedSeats(**data).get_suggestion()
|
||
|
if api == 'play/seat-overview' and member_type == 'nonmember':
|
||
|
print('play/seat-overview')
|
||
|
params = ApiPlaySeatOverview(**data).get_suggestion()
|
||
|
if api == 'cinema/goods-pic' and member_type == 'nonmember':
|
||
|
print('cinema/goods-pic')
|
||
|
params = ApiCinemaGoodsPic(**data).get_suggestion()
|
||
3 months ago
|
if api == 'seat/lock' and member_type == 'nonmember':
|
||
|
print('seat/lock')
|
||
|
params = ApiSeatLock(**data).get_suggestion()
|
||
3 months ago
|
if api == 'order/buy-goods' and member_type == 'nonmember':
|
||
|
print('order/buy-goods')
|
||
|
params = ApiOrderBuyGoods(**data).get_suggestion()
|
||
3 months ago
|
if api == 'ecard/regist' and member_type == 'nonmember':
|
||
|
print('ecard/regist')
|
||
|
params = ApiEcardRegist(**data).get_suggestion()
|
||
|
if api == 'ecard/renew' and member_type == 'nonmember':
|
||
|
print('ecard/renew')
|
||
|
params = ApiEcardRenew(**data).get_suggestion()
|
||
|
if api == 'ecard/detail' and member_type == 'nonmember':
|
||
|
print('ecard/detail')
|
||
|
params = ApiEcardDetail(**data).get_suggestion()
|
||
|
if api == 'ecard/order-detail' and member_type == 'nonmember':
|
||
|
print('ecard/order-detail')
|
||
|
params = ApiEcardOrderDetail(**data).get_suggestion()
|
||
3 months ago
|
if api == 'ecard/seat-price' and member_type == 'nonmember':
|
||
|
print('ecard/seat-price')
|
||
|
params = ApiEcardSeatPrice(**data).get_suggestion()
|
||
3 months ago
|
if api == 'ecard/refund' and member_type == 'nonmember':
|
||
|
print('ecard/refund')
|
||
|
params = ApiEcardRefund(**data).get_suggestion()
|
||
2 months ago
|
if api == 'seat/check-coupon' and member_type == 'nonmember':
|
||
|
print('seat/check-coupon')
|
||
|
print("kwargs['sale_type']", kwargs['sale_type'])
|
||
|
data['sale_type'] = kwargs['sale_type']
|
||
|
params = ApiSeatCheckCoupon(**data).get_suggestion()
|
||
3 months ago
|
return params
|
||
3 months ago
|
|
||
|
def suggest_params_timestamp(member_type, api, ip):
|
||
|
data = {'member_type': member_type, 'api': api, 'ip': ip}
|
||
|
_timestamps = 0
|
||
|
# 非会员
|
||
|
if api == 'cinema/hall-seats' and member_type == 'nonmember':
|
||
|
print('cinema/hall-seats')
|
||
|
_timestamps = ApiCinemaHallSeats(**data).get_timestamp()
|
||
|
if api == 'cinema/plays-increment' and member_type == 'nonmember':
|
||
|
print('cinema/plays-increment')
|
||
|
_timestamps = ApiCinemaPlaysIncrement(**data).get_timestamp()
|
||
|
if api == 'play/info' and member_type == 'nonmember':
|
||
|
print('play/info')
|
||
|
_timestamps = ApiPlayInfo(**data).get_timestamp()
|
||
|
if api == 'play/seat-status' and member_type == 'nonmember':
|
||
|
print('play/seat-status')
|
||
|
_timestamps = ApiPlaySeatStatus(**data).get_timestamp()
|
||
|
if api == 'play/period-changed-seats' and member_type == 'nonmember':
|
||
|
print('play/period-changed-seats')
|
||
|
_timestamps = ApiPlayPeriodChangedSeats(**data).get_timestamp()
|
||
|
if api == 'play/seat-overview' and member_type == 'nonmember':
|
||
|
print('play/seat-overview')
|
||
|
_timestamps = ApiPlaySeatOverview(**data).get_timestamp()
|
||
|
if api == 'cinema/goods-pic' and member_type == 'nonmember':
|
||
|
print('cinema/goods-pic')
|
||
|
_timestamps = ApiCinemaGoodsPic(**data).get_timestamp()
|
||
3 months ago
|
if api == 'seat/lock' and member_type == 'nonmember':
|
||
|
print('seat/lock')
|
||
|
_timestamps = ApiSeatLock(**data).get_timestamp()
|
||
3 months ago
|
if api == 'order/buy-goods' and member_type == 'nonmember':
|
||
|
print('order/buy-goods')
|
||
|
_timestamps = ApiOrderBuyGoods(**data).get_timestamp()
|
||
3 months ago
|
if api == 'ecard/regist' and member_type == 'nonmember':
|
||
|
print('ecard/regist')
|
||
|
_timestamps = ApiEcardRegist(**data).get_timestamp()
|
||
|
if api == 'ecard/renew' and member_type == 'nonmember':
|
||
|
print('ecard/renew')
|
||
|
_timestamps = ApiEcardRenew(**data).get_timestamp()
|
||
|
if api == 'ecard/detail' and member_type == 'nonmember':
|
||
|
print('ecard/detail')
|
||
|
_timestamps = ApiEcardDetail(**data).get_timestamp()
|
||
|
if api == 'ecard/order-detail' and member_type == 'nonmember':
|
||
|
print('ecard/order-detail')
|
||
|
_timestamps = ApiEcardOrderDetail(**data).get_timestamp()
|
||
3 months ago
|
if api == 'ecard/seat-price' and member_type == 'nonmember':
|
||
|
print('ecard/seat-price')
|
||
|
_timestamps = ApiEcardSeatPrice(**data).get_timestamp()
|
||
3 months ago
|
if api == 'ecard/refund' and member_type == 'nonmember':
|
||
|
print('ecard/refund')
|
||
|
_timestamps = ApiEcardRefund(**data).get_timestamp()
|
||
2 months ago
|
if api == 'seat/check-coupon' and member_type == 'nonmember':
|
||
|
print('seat/check-coupon')
|
||
|
_timestamps = ApiSeatCheckCoupon(**data).get_timestamp()
|
||
3 months ago
|
return _timestamps
|