File tree Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 3030 ITEM_BG_TYPE_REVERSE ,
3131 ITEM_TYPE_REVERSE ,
3232 PAY_TYPE_NAME_REVERSE ,
33+ PURCHASE_TYPE_NAME_REVERSE ,
3334 QUEST_FLAG_REVERSE ,
3435 QUEST_TYPE_REVERSE ,
3536 SHOP_TYPE_NAME_REVERSE ,
@@ -499,12 +500,17 @@ async def search_shop(
499500 pay_type_ints = {
500501 PAY_TYPE_NAME_REVERSE [pay_type ] for pay_type in search_param .payType
501502 }
503+ purchase_type_ints = {
504+ PURCHASE_TYPE_NAME_REVERSE [purchase_type ]
505+ for purchase_type in search_param .purchaseType
506+ }
502507
503508 matches = await get_shop_search (
504509 conn ,
505510 event_ids = search_param .eventId ,
506511 shop_type_ints = shop_type_ints ,
507512 pay_type_ints = pay_type_ints ,
513+ purchase_type_ints = purchase_type_ints ,
508514 )
509515
510516 if search_param .name :
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ async def get_shop_search(
7171 event_ids : Iterable [int ] | None = None ,
7272 shop_type_ints : Iterable [int ] | None = None ,
7373 pay_type_ints : Iterable [int ] | None = None ,
74+ purchase_type_ints : Iterable [int ] | None = None ,
7475) -> list [MstShop ]:
7576 from_clause : Join | Table = mstShop
7677 where_clause : list [_ColumnExpressionArgument [bool ]] = [true ()]
@@ -81,6 +82,8 @@ async def get_shop_search(
8182 where_clause .append (mstShop .c .shopType .in_ (shop_type_ints ))
8283 if pay_type_ints :
8384 where_clause .append (mstShop .c .payType .in_ (pay_type_ints ))
85+ if purchase_type_ints :
86+ where_clause .append (mstShop .c .purchaseType .in_ (purchase_type_ints ))
8487
8588 shop_search_stmt = (
8689 select (mstShop ).distinct ().select_from (from_clause ).where (and_ (* where_clause ))
Original file line number Diff line number Diff line change 4545 NiceFuncType ,
4646 NiceGender ,
4747 NicePayType ,
48+ NicePurchaseType ,
4849 NiceQuestFlag ,
4950 NiceQuestType ,
5051 NiceShopType ,
@@ -573,6 +574,10 @@ class EventRewardSceneType(IntEnum):
573574
574575PAY_TYPE_NAME_REVERSE : dict [NicePayType , int ] = {v : k for k , v in PAY_TYPE_NAME .items ()}
575576
577+ PURCHASE_TYPE_NAME_REVERSE : dict [NicePurchaseType , int ] = {
578+ v : k for k , v in PURCHASE_TYPE_NAME .items ()
579+ }
580+
576581
577582### EventPointActivity.objectType ###
578583
Original file line number Diff line number Diff line change 2525 NiceGender ,
2626 NiceItemType ,
2727 NicePayType ,
28+ NicePurchaseType ,
2829 NiceQuestFlag ,
2930 NiceQuestType ,
3031 NiceShopType ,
@@ -522,6 +523,7 @@ class ShopSearchQueryParams:
522523 eventId : list [int ] = Query ([])
523524 type : list [NiceShopType ] = Query ([])
524525 payType : list [NicePayType ] = Query ([])
526+ purchaseType : list [NicePurchaseType ] = Query ([])
525527
526528 def hasSearchParams (self ) -> bool :
527529 return any (
@@ -530,6 +532,7 @@ def hasSearchParams(self) -> bool:
530532 self .eventId ,
531533 self .type ,
532534 self .payType ,
535+ self .purchaseType ,
533536 ]
534537 )
535538
You can’t perform that action at this time.
0 commit comments