1
This commit is contained in:
parent
96c113550d
commit
b880eff9ee
10
main.py
10
main.py
@ -32,11 +32,11 @@ tags_metadata = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
orderby_list = {
|
orderby_list = {
|
||||||
1: "pubDate", # 上线时间
|
1: "pubDate", # 上线时间
|
||||||
2: "discountLeftTime", #折扣截止时间
|
2: "discountLeftTime", #折扣截止时间
|
||||||
3: "isLowest", # 史低
|
3: "isLowest", # 史低
|
||||||
4: "cutOff", # 折扣力度
|
4: "cutOff", # 折扣力度
|
||||||
5: "cuttime", # 价格变动时间
|
5: "cuttime", # 价格变动时间
|
||||||
6: "price", # 当前价格
|
6: "price", # 当前价格
|
||||||
7: "mcScore" # 评分
|
7: "mcScore" # 评分
|
||||||
}
|
}
|
||||||
@ -195,8 +195,8 @@ async def getgameprice(request: Request, oldGameId: int, nums: int = 0):
|
|||||||
else:
|
else:
|
||||||
gameprice = db["gameprice"].find_one({"oldGameId": oldGameId},
|
gameprice = db["gameprice"].find_one({"oldGameId": oldGameId},
|
||||||
{"_id": 0})
|
{"_id": 0})
|
||||||
price = gameprice.get('prices', [])
|
if gameprice:
|
||||||
if price:
|
price = gameprice.get('prices', [])
|
||||||
gameprice['prices'] = price[:nums]
|
gameprice['prices'] = price[:nums]
|
||||||
else:
|
else:
|
||||||
logger.error(f"get price with {oldGameId} failed\n {gameprice}")
|
logger.error(f"get price with {oldGameId} failed\n {gameprice}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user