File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,6 @@ def get_plan_cache():
99
1010 global _plan_cache
1111 if not _plan_cache or (now - _plan_cache [1 ] > CacheExpiration ):
12- _plan_cache = (Plan .select ().where ( Plan . available == True ). order_by (Plan .plan_index ), now )
12+ _plan_cache = (Plan .select ().order_by (Plan .plan_index ), now )
1313
1414 return _plan_cache [0 ]
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ async def query_details(plan_id: str):
2323 "ec" : 200 ,
2424 "data" : {
2525 "title" : p .title ,
26+ "type_id" : p .type_id ,
2627 "price" : p .price ,
2728 "original_price" : p .original_price ,
2829 "popular" : p .popular ,
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ async def query_plan(type_id: str = "GameTools"):
2020 }
2121
2222 for p in get_plan_cache ():
23+ if not p .available :
24+ continue
25+
2326 if p .type_id == type_id :
2427 data ["home" ].append (
2528 {
You can’t perform that action at this time.
0 commit comments