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.
37 lines
1.9 KiB
37 lines
1.9 KiB
from dspt_api.util.api.cinema_hall_seats import ApiCinemaHallSeats |
|
from dspt_api.util.api.cinema_plays_increment import ApiCinemaPlaysIncrement |
|
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 |
|
|
|
|
|
# 通过api来匹配不同的接口文件获取推荐 |
|
# 返回推荐参数应该包含参数名,参数值,和是否勾选的状态 |
|
def suggest_params(member_type, api, ip): |
|
data = {'member_type': member_type, 'api': api, 'ip': ip} |
|
params = [] |
|
# 非会员 |
|
if api == 'cinema/hall-seats' and member_type == 'nonmember': |
|
print('cinema/hall-seats') |
|
params = ApiCinemaHallSeats(**data).get_suggestion() |
|
if api == 'cinema/plays-increment' and member_type == 'nonmember': |
|
print('cinema/plays-increment') |
|
params = ApiCinemaPlaysIncrement(**data).get_suggestion() |
|
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() |
|
return params
|
|
|