@pisell/pisellos 2.2.244 → 2.2.245
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/model/strategy/adapter/promotion/evaluator.js +3 -2
- package/dist/model/strategy/adapter/promotion/index.js +0 -9
- package/dist/model/strategy/adapter/walletPass/utils.js +7 -4
- package/dist/modules/BookingContext/index.d.ts +48 -0
- package/dist/modules/BookingContext/index.js +566 -0
- package/dist/modules/BookingContext/types.d.ts +102 -0
- package/dist/modules/BookingContext/types.js +51 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +284 -0
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +145 -0
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +218 -0
- package/dist/modules/BookingContext/utils/flexible.d.ts +28 -0
- package/dist/modules/BookingContext/utils/flexible.js +56 -0
- package/dist/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
- package/dist/modules/BookingContext/utils/formatResourceList.js +38 -0
- package/dist/modules/BookingContext/utils/index.d.ts +11 -0
- package/dist/modules/BookingContext/utils/index.js +11 -0
- package/dist/modules/BookingContext/utils/noResource.d.ts +13 -0
- package/dist/modules/BookingContext/utils/noResource.js +77 -0
- package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
- package/dist/modules/BookingContext/utils/orderLineDisplay.js +36 -0
- package/dist/modules/BookingContext/utils/productExtend.d.ts +72 -0
- package/dist/modules/BookingContext/utils/productExtend.js +339 -0
- package/dist/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
- package/dist/modules/BookingContext/utils/resourceErrors.js +74 -0
- package/dist/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
- package/dist/modules/BookingContext/utils/resourceSelection.js +24 -0
- package/dist/modules/BookingContext/utils/resources.d.ts +80 -0
- package/dist/modules/BookingContext/utils/resources.js +486 -0
- package/dist/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
- package/dist/modules/BookingContext/utils/serviceTimes.js +151 -0
- package/dist/modules/BookingContext/utils/timeSlices.d.ts +42 -0
- package/dist/modules/BookingContext/utils/timeSlices.js +100 -0
- package/dist/modules/Cart/utils/cartProduct.js +24 -3
- package/dist/modules/Cart/utils/changePrice.js +11 -11
- package/dist/modules/Customer/index.d.ts +20 -0
- package/dist/modules/Customer/index.js +172 -83
- package/dist/modules/Customer/types.d.ts +2 -0
- package/dist/modules/Discount/index.d.ts +1 -1
- package/dist/modules/Discount/index.js +13 -6
- package/dist/modules/Discount/types.d.ts +1 -0
- package/dist/modules/OpenData/index.d.ts +8 -0
- package/dist/modules/OpenData/index.js +37 -17
- package/dist/modules/Order/index.d.ts +275 -19
- package/dist/modules/Order/index.js +3493 -809
- package/dist/modules/Order/types.d.ts +286 -31
- package/dist/modules/Order/types.js +38 -0
- package/dist/modules/Order/utils/manualProductDiscount.d.ts +106 -0
- package/dist/modules/Order/utils/manualProductDiscount.js +210 -0
- package/dist/modules/Order/utils.d.ts +147 -5
- package/dist/modules/Order/utils.js +750 -104
- package/dist/modules/Payment/index.d.ts +10 -13
- package/dist/modules/Payment/index.js +467 -837
- package/dist/modules/Payment/types.d.ts +2 -0
- package/dist/modules/Payment/utils.js +2 -1
- package/dist/modules/Payment/walletpass.js +41 -25
- package/dist/modules/ProductList/index.d.ts +16 -12
- package/dist/modules/ProductList/index.js +133 -59
- package/dist/modules/ProductList/types.d.ts +14 -0
- package/dist/modules/Quotation/index.d.ts +0 -1
- package/dist/modules/Quotation/index.js +25 -22
- package/dist/modules/Rules/index.d.ts +4 -0
- package/dist/modules/Rules/index.js +97 -70
- package/dist/modules/Rules/types.d.ts +1 -0
- package/dist/modules/SalesSummary/index.d.ts +8 -25
- package/dist/modules/SalesSummary/index.js +86 -35
- package/dist/modules/SalesSummary/types.d.ts +4 -1
- package/dist/modules/SalesSummary/utils.d.ts +2 -25
- package/dist/modules/SalesSummary/utils.js +794 -162
- package/dist/modules/Schedule/index.d.ts +7 -0
- package/dist/modules/Schedule/index.js +24 -2
- package/dist/modules/Summary/index.js +4 -3
- package/dist/modules/SurchargeList/index.d.ts +16 -0
- package/dist/modules/SurchargeList/index.js +162 -0
- package/dist/modules/SurchargeList/types.d.ts +11 -0
- package/dist/modules/SurchargeList/types.js +1 -0
- package/dist/modules/index.d.ts +2 -0
- package/dist/modules/index.js +3 -1
- package/dist/plugins/request.d.ts +1 -0
- package/dist/server/index.d.ts +204 -1
- package/dist/server/index.js +3654 -922
- package/dist/server/modules/index.d.ts +2 -0
- package/dist/server/modules/index.js +2 -0
- package/dist/server/modules/order/index.d.ts +120 -3
- package/dist/server/modules/order/index.js +1758 -448
- package/dist/server/modules/order/types.d.ts +32 -3
- package/dist/server/modules/order/types.js +8 -0
- package/dist/server/modules/order/utils/filterBookings.js +26 -3
- package/dist/server/modules/order/utils/filterOrders.js +23 -8
- package/dist/server/modules/payment/index.d.ts +28 -0
- package/dist/server/modules/payment/index.js +305 -0
- package/dist/server/modules/payment/types.d.ts +9 -0
- package/dist/server/modules/payment/types.js +1 -0
- package/dist/server/modules/products/index.d.ts +34 -7
- package/dist/server/modules/products/index.js +631 -317
- package/dist/server/modules/resource/index.d.ts +2 -0
- package/dist/server/modules/resource/index.js +29 -3
- package/dist/server/modules/schedule/index.d.ts +4 -4
- package/dist/server/modules/schedule/index.js +111 -88
- package/dist/server/test.json +713 -0
- package/dist/server/utils/small-ticket.d.ts +71 -0
- package/dist/server/utils/small-ticket.js +840 -0
- package/dist/solution/BaseSales/index.d.ts +133 -10
- package/dist/solution/BaseSales/index.js +1950 -447
- package/dist/solution/BaseSales/types.d.ts +82 -6
- package/dist/solution/BaseSales/types.js +5 -4
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +287 -0
- package/dist/solution/BaseSales/utils/cartPromotion.js +1438 -0
- package/dist/solution/BaseSales/utils/quotationPrice.d.ts +7 -0
- package/dist/solution/BaseSales/utils/quotationPrice.js +237 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +105 -24
- package/dist/solution/BaseSales/utils.d.ts +1 -1
- package/dist/solution/BaseSales/utils.js +62 -21
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +271 -11
- package/dist/solution/BookingTicket/index.js +1777 -242
- package/dist/solution/BookingTicket/types.d.ts +118 -1
- package/dist/solution/BookingTicket/types.js +41 -2
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +117 -0
- package/dist/solution/BookingTicket/utils/addProductDecision.js +346 -0
- package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
- package/dist/solution/BookingTicket/utils/addTimeAvailability.js +95 -0
- package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +40 -0
- package/dist/solution/BookingTicket/utils/bookingStatus.js +70 -0
- package/dist/solution/BookingTicket/utils/cartView.d.ts +9 -1
- package/dist/solution/BookingTicket/utils/cartView.js +94 -7
- package/dist/solution/BookingTicket/utils/exampleData.d.ts +123 -0
- package/dist/solution/BookingTicket/utils/exampleData.js +183 -0
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +438 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +36 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +400 -0
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +32 -0
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.js +56 -0
- package/dist/solution/BookingTicket/utils/scan/index.d.ts +5 -0
- package/dist/solution/BookingTicket/utils/scan/index.js +20 -8
- package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
- package/dist/solution/BookingTicket/utils/scan/scanProductValues.js +150 -0
- package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts +23 -0
- package/dist/solution/BookingTicket/utils/sessionCatalogStale.js +78 -0
- package/dist/solution/Checkout/index.d.ts +1 -0
- package/dist/solution/Checkout/index.js +10 -9
- package/dist/solution/RegisterAndLogin/config.js +2 -10
- package/dist/solution/ScanOrder/index.d.ts +9 -3
- package/dist/solution/ScanOrder/index.js +241 -134
- package/dist/solution/ScanOrder/types.d.ts +9 -5
- package/dist/solution/ScanOrder/types.js +2 -3
- package/dist/solution/ScanOrder/utils.d.ts +1 -1
- package/dist/solution/ScanOrder/utils.js +84 -22
- package/dist/solution/VenueBooking/index.d.ts +5 -2
- package/dist/solution/VenueBooking/index.js +110 -59
- package/dist/solution/VenueBooking/sales-section-4-annotated.json +0 -2
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -0
- package/dist/solution/VenueBooking/utils/slotMerge.js +10 -0
- package/dist/types/index.d.ts +10 -0
- package/lib/model/strategy/adapter/promotion/evaluator.js +2 -1
- package/lib/model/strategy/adapter/promotion/index.js +49 -0
- package/lib/model/strategy/adapter/walletPass/utils.js +3 -2
- package/lib/modules/BookingContext/index.d.ts +48 -0
- package/lib/modules/BookingContext/index.js +368 -0
- package/lib/modules/BookingContext/types.d.ts +102 -0
- package/lib/modules/BookingContext/types.js +34 -0
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +16 -0
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +276 -0
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +8 -0
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +151 -0
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +201 -0
- package/lib/modules/BookingContext/utils/flexible.d.ts +28 -0
- package/lib/modules/BookingContext/utils/flexible.js +80 -0
- package/lib/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
- package/lib/modules/BookingContext/utils/formatResourceList.js +50 -0
- package/lib/modules/BookingContext/utils/index.d.ts +11 -0
- package/lib/modules/BookingContext/utils/index.js +43 -0
- package/lib/modules/BookingContext/utils/noResource.d.ts +13 -0
- package/lib/modules/BookingContext/utils/noResource.js +90 -0
- package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
- package/lib/modules/BookingContext/utils/orderLineDisplay.js +56 -0
- package/lib/modules/BookingContext/utils/productExtend.d.ts +72 -0
- package/lib/modules/BookingContext/utils/productExtend.js +283 -0
- package/lib/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
- package/lib/modules/BookingContext/utils/resourceErrors.js +80 -0
- package/lib/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
- package/lib/modules/BookingContext/utils/resourceSelection.js +46 -0
- package/lib/modules/BookingContext/utils/resources.d.ts +80 -0
- package/lib/modules/BookingContext/utils/resources.js +377 -0
- package/lib/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
- package/lib/modules/BookingContext/utils/serviceTimes.js +162 -0
- package/lib/modules/BookingContext/utils/timeSlices.d.ts +42 -0
- package/lib/modules/BookingContext/utils/timeSlices.js +124 -0
- package/lib/modules/Cart/utils/cartProduct.js +20 -3
- package/lib/modules/Cart/utils/changePrice.js +12 -20
- package/lib/modules/Customer/index.d.ts +20 -0
- package/lib/modules/Customer/index.js +64 -11
- package/lib/modules/Customer/types.d.ts +2 -0
- package/lib/modules/Discount/index.d.ts +1 -1
- package/lib/modules/Discount/index.js +9 -1
- package/lib/modules/Discount/types.d.ts +1 -0
- package/lib/modules/OpenData/index.d.ts +8 -0
- package/lib/modules/OpenData/index.js +19 -5
- package/lib/modules/Order/index.d.ts +275 -19
- package/lib/modules/Order/index.js +2245 -336
- package/lib/modules/Order/types.d.ts +286 -31
- package/lib/modules/Order/types.js +1 -0
- package/lib/modules/Order/utils/manualProductDiscount.d.ts +106 -0
- package/lib/modules/Order/utils/manualProductDiscount.js +206 -0
- package/lib/modules/Order/utils.d.ts +147 -5
- package/lib/modules/Order/utils.js +615 -46
- package/lib/modules/Payment/index.d.ts +10 -13
- package/lib/modules/Payment/index.js +18 -150
- package/lib/modules/Payment/types.d.ts +2 -0
- package/lib/modules/Payment/utils.js +2 -1
- package/lib/modules/Payment/walletpass.js +16 -3
- package/lib/modules/ProductList/index.d.ts +16 -12
- package/lib/modules/ProductList/index.js +41 -4
- package/lib/modules/ProductList/types.d.ts +14 -0
- package/lib/modules/Quotation/index.d.ts +0 -1
- package/lib/modules/Quotation/index.js +19 -16
- package/lib/modules/Rules/index.d.ts +4 -0
- package/lib/modules/Rules/index.js +137 -120
- package/lib/modules/Rules/types.d.ts +1 -0
- package/lib/modules/SalesSummary/index.d.ts +8 -25
- package/lib/modules/SalesSummary/index.js +30 -4
- package/lib/modules/SalesSummary/types.d.ts +4 -1
- package/lib/modules/SalesSummary/utils.d.ts +2 -25
- package/lib/modules/SalesSummary/utils.js +645 -91
- package/lib/modules/Schedule/index.d.ts +7 -0
- package/lib/modules/Schedule/index.js +17 -1
- package/lib/modules/Summary/index.js +5 -4
- package/lib/modules/SurchargeList/index.d.ts +16 -0
- package/lib/modules/SurchargeList/index.js +89 -0
- package/lib/modules/SurchargeList/types.d.ts +11 -0
- package/lib/modules/SurchargeList/types.js +17 -0
- package/lib/modules/index.d.ts +2 -0
- package/lib/modules/index.js +5 -1
- package/lib/plugins/request.d.ts +1 -0
- package/lib/server/index.d.ts +204 -1
- package/lib/server/index.js +1891 -59
- package/lib/server/modules/index.d.ts +2 -0
- package/lib/server/modules/index.js +3 -0
- package/lib/server/modules/order/index.d.ts +120 -3
- package/lib/server/modules/order/index.js +883 -94
- package/lib/server/modules/order/types.d.ts +32 -3
- package/lib/server/modules/order/utils/filterBookings.js +24 -5
- package/lib/server/modules/order/utils/filterOrders.js +15 -6
- package/lib/server/modules/payment/index.d.ts +28 -0
- package/lib/server/modules/payment/index.js +192 -0
- package/lib/server/modules/payment/types.d.ts +9 -0
- package/lib/server/modules/payment/types.js +17 -0
- package/lib/server/modules/products/index.d.ts +34 -7
- package/lib/server/modules/products/index.js +189 -54
- package/lib/server/modules/resource/index.d.ts +2 -0
- package/lib/server/modules/resource/index.js +27 -3
- package/lib/server/modules/schedule/index.d.ts +4 -4
- package/lib/server/modules/schedule/index.js +47 -40
- package/lib/server/test.json +713 -0
- package/lib/server/utils/small-ticket.d.ts +71 -0
- package/lib/server/utils/small-ticket.js +800 -0
- package/lib/solution/BaseSales/index.d.ts +133 -10
- package/lib/solution/BaseSales/index.js +1111 -63
- package/lib/solution/BaseSales/types.d.ts +82 -6
- package/lib/solution/BaseSales/types.js +3 -1
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +287 -0
- package/lib/solution/BaseSales/utils/cartPromotion.js +992 -0
- package/lib/solution/BaseSales/utils/quotationPrice.d.ts +7 -0
- package/lib/solution/BaseSales/utils/quotationPrice.js +277 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +106 -18
- package/lib/solution/BaseSales/utils.d.ts +1 -1
- package/lib/solution/BaseSales/utils.js +54 -10
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +271 -11
- package/lib/solution/BookingTicket/index.js +922 -29
- package/lib/solution/BookingTicket/types.d.ts +118 -1
- package/lib/solution/BookingTicket/types.js +11 -0
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +117 -0
- package/lib/solution/BookingTicket/utils/addProductDecision.js +318 -0
- package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
- package/lib/solution/BookingTicket/utils/addTimeAvailability.js +125 -0
- package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +40 -0
- package/lib/solution/BookingTicket/utils/bookingStatus.js +44 -2
- package/lib/solution/BookingTicket/utils/cartView.d.ts +9 -1
- package/lib/solution/BookingTicket/utils/cartView.js +61 -6
- package/lib/solution/BookingTicket/utils/exampleData.d.ts +123 -0
- package/lib/solution/BookingTicket/utils/exampleData.js +0 -0
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +254 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +36 -0
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +169 -0
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +32 -0
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +51 -0
- package/lib/solution/BookingTicket/utils/scan/index.d.ts +5 -0
- package/lib/solution/BookingTicket/utils/scan/index.js +17 -3
- package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
- package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +127 -0
- package/lib/solution/BookingTicket/utils/sessionCatalogStale.d.ts +23 -0
- package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +85 -0
- package/lib/solution/Checkout/index.d.ts +1 -0
- package/lib/solution/Checkout/index.js +1 -2
- package/lib/solution/RegisterAndLogin/config.js +2 -10
- package/lib/solution/ScanOrder/index.d.ts +9 -3
- package/lib/solution/ScanOrder/index.js +153 -70
- package/lib/solution/ScanOrder/types.d.ts +9 -5
- package/lib/solution/ScanOrder/utils.d.ts +1 -1
- package/lib/solution/ScanOrder/utils.js +83 -17
- package/lib/solution/VenueBooking/index.d.ts +5 -2
- package/lib/solution/VenueBooking/index.js +54 -17
- package/lib/solution/VenueBooking/sales-section-4-annotated.json +0 -2
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -0
- package/lib/solution/VenueBooking/utils/slotMerge.js +10 -0
- package/lib/types/index.d.ts +10 -0
- package/package.json +1 -1
- package/dist/solution/Checkout/appointmentDemo.json +0 -1
- package/lib/solution/Checkout/appointmentDemo.json +0 -1
|
@@ -11,6 +11,13 @@ export declare class ScheduleModule extends BaseModule implements Module, Schedu
|
|
|
11
11
|
private fatherModule;
|
|
12
12
|
constructor(name?: string, version?: string);
|
|
13
13
|
initialize(core: PisellCore, options: ModuleOptions): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* 更新父级解决方案透传的运行态参数,并刷新 schedule 缓存写入配置。
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* scheduleModule.updateOtherParams({ openCache: true, cacheId: 'cache-2' });
|
|
19
|
+
*/
|
|
20
|
+
updateOtherParams(params: Record<string, any>): void;
|
|
14
21
|
/**
|
|
15
22
|
* 加载当前店铺下所有 schedule
|
|
16
23
|
*
|
|
@@ -73,6 +73,18 @@ var ScheduleModule = class extends import_BaseModule.BaseModule {
|
|
|
73
73
|
this.fatherModule = options.otherParams.fatherModule;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* 更新父级解决方案透传的运行态参数,并刷新 schedule 缓存写入配置。
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* scheduleModule.updateOtherParams({ openCache: true, cacheId: 'cache-2' });
|
|
81
|
+
*/
|
|
82
|
+
updateOtherParams(params) {
|
|
83
|
+
const otherParams = params || {};
|
|
84
|
+
this.openCache = otherParams.openCache ?? false;
|
|
85
|
+
this.cacheId = otherParams.cacheId;
|
|
86
|
+
this.fatherModule = otherParams.fatherModule;
|
|
87
|
+
}
|
|
76
88
|
/**
|
|
77
89
|
* 加载当前店铺下所有 schedule
|
|
78
90
|
*
|
|
@@ -135,7 +147,11 @@ var ScheduleModule = class extends import_BaseModule.BaseModule {
|
|
|
135
147
|
return dates;
|
|
136
148
|
}
|
|
137
149
|
getScheduleListByIds(ids) {
|
|
138
|
-
|
|
150
|
+
var _a;
|
|
151
|
+
const idSet = new Set(ids.map((id) => String(id)));
|
|
152
|
+
console.log("getScheduleListByIds", this.store.scheduleList);
|
|
153
|
+
const list = (_a = this.store.scheduleList) == null ? void 0 : _a.filter((n) => idSet.has(String(n.id)));
|
|
154
|
+
return list;
|
|
139
155
|
}
|
|
140
156
|
setAvailabilityScheduleDateList(list) {
|
|
141
157
|
this.store.availabilityDateList = list;
|
|
@@ -74,10 +74,10 @@ var SummaryModule = class extends import_BaseModule.BaseModule {
|
|
|
74
74
|
this.store.surchargeList = (surchargeList == null ? void 0 : surchargeList.data) || [];
|
|
75
75
|
}
|
|
76
76
|
async getSummary(cartItems) {
|
|
77
|
-
var _a, _b, _c;
|
|
77
|
+
var _a, _b, _c, _d;
|
|
78
78
|
const shopInfo = ((_b = (_a = this.shopStore.get("core")) == null ? void 0 : _a.core) == null ? void 0 : _b.shop) || {};
|
|
79
79
|
const scheduleModule = this.core.getModule("appointmentBooking_schedule");
|
|
80
|
-
const needScheduleIds = this.store.surchargeList.map((item) => item.available_schedule_ids).flat();
|
|
80
|
+
const needScheduleIds = (_c = this.store.surchargeList) == null ? void 0 : _c.map((item) => item.available_schedule_ids).flat();
|
|
81
81
|
const scheduleList = scheduleModule == null ? void 0 : scheduleModule.getScheduleListByIds(needScheduleIds);
|
|
82
82
|
const scheduleById = {};
|
|
83
83
|
if (Array.isArray(scheduleList)) {
|
|
@@ -85,7 +85,7 @@ var SummaryModule = class extends import_BaseModule.BaseModule {
|
|
|
85
85
|
scheduleById[item.id] = item;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
const summary = (0, import_utils.calculatePriceDetails)(shopInfo, cartItems, (
|
|
88
|
+
const summary = (0, import_utils.calculatePriceDetails)(shopInfo, cartItems, (_d = import_Schedule.ScheduleModule) == null ? void 0 : _d.isInScheduleByDate, this.store.surchargeList, scheduleById);
|
|
89
89
|
this.store.summary = summary;
|
|
90
90
|
return this.store.summary;
|
|
91
91
|
}
|
|
@@ -119,8 +119,9 @@ var SummaryModule = class extends import_BaseModule.BaseModule {
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
getSurchargeforUtils(items) {
|
|
122
|
+
var _a;
|
|
122
123
|
const scheduleModule = this.core.getModule("appointmentBooking_schedule");
|
|
123
|
-
const needScheduleIds = this.store.surchargeList.map((item) => item.available_schedule_ids).flat();
|
|
124
|
+
const needScheduleIds = (_a = this.store.surchargeList) == null ? void 0 : _a.map((item) => item.available_schedule_ids).flat();
|
|
124
125
|
const scheduleList = scheduleModule == null ? void 0 : scheduleModule.getScheduleListByIds(needScheduleIds);
|
|
125
126
|
const scheduleById = {};
|
|
126
127
|
if (Array.isArray(scheduleList)) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Module, ModuleOptions, PisellCore } from '../../types';
|
|
2
|
+
import { BaseModule } from '../BaseModule';
|
|
3
|
+
import { SurchargeListItem, SurchargeListModuleAPI } from './types';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export declare class SurchargeListModule extends BaseModule implements Module, SurchargeListModuleAPI {
|
|
6
|
+
protected defaultName: string;
|
|
7
|
+
protected defaultVersion: string;
|
|
8
|
+
private request;
|
|
9
|
+
private store;
|
|
10
|
+
private loadingPromise;
|
|
11
|
+
constructor(name?: string, version?: string);
|
|
12
|
+
initialize(core: PisellCore, options: ModuleOptions): Promise<void>;
|
|
13
|
+
getSurchargeList(): Promise<SurchargeListItem[]>;
|
|
14
|
+
refreshSurchargeList(): Promise<SurchargeListItem[]>;
|
|
15
|
+
private loadSurchargeList;
|
|
16
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/modules/SurchargeList/index.ts
|
|
21
|
+
var SurchargeList_exports = {};
|
|
22
|
+
__export(SurchargeList_exports, {
|
|
23
|
+
SurchargeListModule: () => SurchargeListModule
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(SurchargeList_exports);
|
|
26
|
+
var import_BaseModule = require("../BaseModule");
|
|
27
|
+
__reExport(SurchargeList_exports, require("./types"), module.exports);
|
|
28
|
+
var SurchargeListModule = class extends import_BaseModule.BaseModule {
|
|
29
|
+
constructor(name, version) {
|
|
30
|
+
super(name, version);
|
|
31
|
+
this.defaultName = "surchargeList";
|
|
32
|
+
this.defaultVersion = "1.0.0";
|
|
33
|
+
this.loadingPromise = null;
|
|
34
|
+
}
|
|
35
|
+
async initialize(core, options) {
|
|
36
|
+
var _a, _b, _c;
|
|
37
|
+
this.core = core;
|
|
38
|
+
this.store = options.store;
|
|
39
|
+
this.request = this.core.getPlugin("request");
|
|
40
|
+
const hasInitialSurchargeList = Array.isArray(
|
|
41
|
+
(_a = options.initialState) == null ? void 0 : _a.surchargeList
|
|
42
|
+
);
|
|
43
|
+
this.store.surchargeList = hasInitialSurchargeList ? (_b = options.initialState) == null ? void 0 : _b.surchargeList : [];
|
|
44
|
+
this.store.isLoaded = Boolean((_c = options.initialState) == null ? void 0 : _c.isLoaded) || hasInitialSurchargeList;
|
|
45
|
+
if (!this.request) {
|
|
46
|
+
throw new Error("SurchargeListModule 需要 request 插件支持");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async getSurchargeList() {
|
|
50
|
+
if (this.store.isLoaded)
|
|
51
|
+
return this.store.surchargeList;
|
|
52
|
+
if (this.loadingPromise)
|
|
53
|
+
return this.loadingPromise;
|
|
54
|
+
this.loadingPromise = this.loadSurchargeList();
|
|
55
|
+
return this.loadingPromise;
|
|
56
|
+
}
|
|
57
|
+
async refreshSurchargeList() {
|
|
58
|
+
this.loadingPromise = this.loadSurchargeList();
|
|
59
|
+
return this.loadingPromise;
|
|
60
|
+
}
|
|
61
|
+
async loadSurchargeList() {
|
|
62
|
+
try {
|
|
63
|
+
const surchargeList = await this.request.get(
|
|
64
|
+
"/order/custom-surcharge/available/v2",
|
|
65
|
+
{
|
|
66
|
+
channel: "online-store",
|
|
67
|
+
is_assemble_product_data: 1,
|
|
68
|
+
is_assemble_schedule_data: 1,
|
|
69
|
+
with: ["relationSchedule"]
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
this.store.surchargeList = (surchargeList == null ? void 0 : surchargeList.data) || [];
|
|
73
|
+
this.store.isLoaded = true;
|
|
74
|
+
return this.store.surchargeList;
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.warn("[SurchargeListModule] 加载附加费配置失败", error);
|
|
77
|
+
this.store.surchargeList = [];
|
|
78
|
+
this.store.isLoaded = true;
|
|
79
|
+
return this.store.surchargeList;
|
|
80
|
+
} finally {
|
|
81
|
+
this.loadingPromise = null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
86
|
+
0 && (module.exports = {
|
|
87
|
+
SurchargeListModule,
|
|
88
|
+
...require("./types")
|
|
89
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface SurchargeListItem {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export interface SurchargeListState {
|
|
5
|
+
surchargeList: SurchargeListItem[];
|
|
6
|
+
isLoaded: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SurchargeListModuleAPI {
|
|
9
|
+
getSurchargeList(): Promise<SurchargeListItem[]>;
|
|
10
|
+
refreshSurchargeList(): Promise<SurchargeListItem[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/modules/SurchargeList/types.ts
|
|
16
|
+
var types_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
package/lib/modules/index.d.ts
CHANGED
|
@@ -12,7 +12,9 @@ export * from './Resource';
|
|
|
12
12
|
export * from './Step';
|
|
13
13
|
export * from './Summary';
|
|
14
14
|
export * from './SalesSummary';
|
|
15
|
+
export * from './SurchargeList';
|
|
15
16
|
export * from './Schedule';
|
|
16
17
|
export * from './Quotation';
|
|
17
18
|
export * from './ScanOrderLogger';
|
|
18
19
|
export * from './OpenData';
|
|
20
|
+
export * from './BookingContext';
|
package/lib/modules/index.js
CHANGED
|
@@ -30,10 +30,12 @@ __reExport(modules_exports, require("./Resource"), module.exports);
|
|
|
30
30
|
__reExport(modules_exports, require("./Step"), module.exports);
|
|
31
31
|
__reExport(modules_exports, require("./Summary"), module.exports);
|
|
32
32
|
__reExport(modules_exports, require("./SalesSummary"), module.exports);
|
|
33
|
+
__reExport(modules_exports, require("./SurchargeList"), module.exports);
|
|
33
34
|
__reExport(modules_exports, require("./Schedule"), module.exports);
|
|
34
35
|
__reExport(modules_exports, require("./Quotation"), module.exports);
|
|
35
36
|
__reExport(modules_exports, require("./ScanOrderLogger"), module.exports);
|
|
36
37
|
__reExport(modules_exports, require("./OpenData"), module.exports);
|
|
38
|
+
__reExport(modules_exports, require("./BookingContext"), module.exports);
|
|
37
39
|
// Annotate the CommonJS export names for ESM import in node:
|
|
38
40
|
0 && (module.exports = {
|
|
39
41
|
...require("./Product"),
|
|
@@ -50,8 +52,10 @@ __reExport(modules_exports, require("./OpenData"), module.exports);
|
|
|
50
52
|
...require("./Step"),
|
|
51
53
|
...require("./Summary"),
|
|
52
54
|
...require("./SalesSummary"),
|
|
55
|
+
...require("./SurchargeList"),
|
|
53
56
|
...require("./Schedule"),
|
|
54
57
|
...require("./Quotation"),
|
|
55
58
|
...require("./ScanOrderLogger"),
|
|
56
|
-
...require("./OpenData")
|
|
59
|
+
...require("./OpenData"),
|
|
60
|
+
...require("./BookingContext")
|
|
57
61
|
});
|
package/lib/plugins/request.d.ts
CHANGED
package/lib/server/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { QuotationModule } from './modules/quotation';
|
|
|
4
4
|
import { ScheduleModuleEx } from './modules/schedule';
|
|
5
5
|
import { ResourceModule } from './modules/resource';
|
|
6
6
|
import { FloorPlanModule } from './modules/floor-plan';
|
|
7
|
+
import { PaymentServerModule } from './modules/payment';
|
|
7
8
|
import { PisellCore, ServerModuleConfig, InitializeServerOptions } from '../types';
|
|
8
9
|
import type { RouteHandler, HttpMethod, RouteDefinition, Router, ModuleRegistryConfig, RequestSetting } from './types';
|
|
9
10
|
import { OrderModule } from './modules/order';
|
|
@@ -23,6 +24,11 @@ declare class Server {
|
|
|
23
24
|
resource?: ResourceModule;
|
|
24
25
|
order?: OrderModule;
|
|
25
26
|
floor_plan?: FloorPlanModule;
|
|
27
|
+
payment?: PaymentServerModule;
|
|
28
|
+
private paymentRouteModule?;
|
|
29
|
+
private paymentRouteModuleInFlight?;
|
|
30
|
+
private quotationAvailableCache;
|
|
31
|
+
private quotationAvailableInFlight;
|
|
26
32
|
/** GET 前缀路由(最长前缀优先匹配) */
|
|
27
33
|
private prefixRouterGet;
|
|
28
34
|
router: Router;
|
|
@@ -33,6 +39,8 @@ declare class Server {
|
|
|
33
39
|
private bookingRemoteCache;
|
|
34
40
|
private readonly BOOKING_REMOTE_CACHE_TTL_MS;
|
|
35
41
|
private readonly BOOKING_REMOTE_CACHE_MAX_ENTRIES;
|
|
42
|
+
private salesSearchSubscribers;
|
|
43
|
+
private deviceTaskActionsRegistered;
|
|
36
44
|
private floorPlanQuerySubscribers;
|
|
37
45
|
private moduleRegistry;
|
|
38
46
|
constructor(core: PisellCore);
|
|
@@ -85,6 +93,11 @@ declare class Server {
|
|
|
85
93
|
config: ModuleRegistryConfig;
|
|
86
94
|
shouldPreload: boolean;
|
|
87
95
|
}[]>;
|
|
96
|
+
private registerDeviceTaskActions;
|
|
97
|
+
private handleSyncSalesTask;
|
|
98
|
+
private runCheckoutSync;
|
|
99
|
+
private omitCheckoutSyncMode;
|
|
100
|
+
private persistSyncedCheckoutOrder;
|
|
88
101
|
/**
|
|
89
102
|
* 将普通层 QuotationModule 的报价单计算能力桥接到 Server Products 模块。
|
|
90
103
|
*/
|
|
@@ -167,6 +180,11 @@ declare class Server {
|
|
|
167
180
|
* @private
|
|
168
181
|
*/
|
|
169
182
|
private registerServerRoutes;
|
|
183
|
+
private getPaymentRouteModule;
|
|
184
|
+
private handlePaymentMethods;
|
|
185
|
+
private handleQuotationAvailable;
|
|
186
|
+
private fetchQuotationAvailableFromAPI;
|
|
187
|
+
private isSuccessfulRemoteResponse;
|
|
170
188
|
/**
|
|
171
189
|
* 根据 subscriberId 移除商品查询订阅者
|
|
172
190
|
*/
|
|
@@ -194,6 +212,84 @@ declare class Server {
|
|
|
194
212
|
* 取消订单列表查询订阅(HTTP 路由入口)
|
|
195
213
|
*/
|
|
196
214
|
private handleUnsubscribeOrderQuery;
|
|
215
|
+
/**
|
|
216
|
+
* 处理 sales 单模块搜索:请求透传后端,仅在 OS 层维护已返回订单号集合。
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* await this.handleSalesSearchModule({ url: '/shop/es/search/sales', method: 'post', data: { keyword: 'A' } })
|
|
220
|
+
*/
|
|
221
|
+
private handleSalesSearchModule;
|
|
222
|
+
/**
|
|
223
|
+
* 处理 sales 聚合搜索:请求透传后端,仅订阅 sales 分组的已返回订单号。
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* await this.handleSalesSearchAggregate({ url: '/shop/es/search', method: 'post', data: { modules: [] } })
|
|
227
|
+
*/
|
|
228
|
+
private handleSalesSearchAggregate;
|
|
229
|
+
/**
|
|
230
|
+
* 取消 sales 搜索订阅。
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* await this.handleUnsubscribeSalesSearch({ data: { subscriberId: 'global-search-order' } } as any)
|
|
234
|
+
*/
|
|
235
|
+
private handleUnsubscribeSalesSearch;
|
|
236
|
+
/**
|
|
237
|
+
* 执行 sales 搜索并登记可见订单号。
|
|
238
|
+
* 搜索参数完全透传后端,OS 不做过滤、筛选、排序。
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* const result = await this.handleSalesSearchRequest('single', '/shop/es/search/sales', { keyword: '1001' }, {})
|
|
242
|
+
*/
|
|
243
|
+
private handleSalesSearchRequest;
|
|
244
|
+
/**
|
|
245
|
+
* 透传调用后端 sales 搜索接口。
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* const res = await this.fetchSalesSearchFromAPI('/shop/es/search/sales', { keyword: '1001' })
|
|
249
|
+
*/
|
|
250
|
+
private fetchSalesSearchFromAPI;
|
|
251
|
+
/**
|
|
252
|
+
* 构建搜索订阅签名;页码变化不重置,可继续累计 visibleOrderIds。
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* const signature = this.buildSalesSearchSignature('single', { keyword: 'A', page: 2 })
|
|
256
|
+
*/
|
|
257
|
+
private buildSalesSearchSignature;
|
|
258
|
+
/**
|
|
259
|
+
* 移除页码参数,保留 page size、keyword、filters、sort 等查询语义参数。
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* this.stripSalesSearchPageParams({ page: 2, per_page: 20, keyword: 'A' })
|
|
263
|
+
*/
|
|
264
|
+
private stripSalesSearchPageParams;
|
|
265
|
+
/**
|
|
266
|
+
* 提取响应 data,兼容 OS 包装结构与后端直接响应结构。
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* const data = this.extractSalesSearchResponseData(result)
|
|
270
|
+
*/
|
|
271
|
+
private extractSalesSearchResponseData;
|
|
272
|
+
/**
|
|
273
|
+
* 从搜索响应中提取 sales 命中的订单号。
|
|
274
|
+
*
|
|
275
|
+
* @example
|
|
276
|
+
* const ids = this.extractSalesSearchOrderIds('single', result)
|
|
277
|
+
*/
|
|
278
|
+
private extractSalesSearchOrderIds;
|
|
279
|
+
/**
|
|
280
|
+
* 查找聚合搜索响应中的 sales 分组。
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* const group = this.findSalesSearchAggregateGroup({ results: [{ module: 'sales' }] })
|
|
284
|
+
*/
|
|
285
|
+
private findSalesSearchAggregateGroup;
|
|
286
|
+
/**
|
|
287
|
+
* 从订单或搜索命中项中取订单号。
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* const id = this.getSalesSearchOrderId({ order_id: 1001 })
|
|
291
|
+
*/
|
|
292
|
+
private getSalesSearchOrderId;
|
|
197
293
|
/**
|
|
198
294
|
* 从查询值中提取 YYYY-MM-DD 日期串。
|
|
199
295
|
*
|
|
@@ -284,6 +380,49 @@ declare class Server {
|
|
|
284
380
|
* @example 批量:GET /update/localOrder?order_ids=96971,96972,96973
|
|
285
381
|
*/
|
|
286
382
|
private handleUpdateLocalOrder;
|
|
383
|
+
private handleOrderSalesCheckout;
|
|
384
|
+
private handleOrderCheckout;
|
|
385
|
+
private getDeviceTaskPlugin;
|
|
386
|
+
private getIdGeneratorPlugin;
|
|
387
|
+
private getAppData;
|
|
388
|
+
private getSmallTicketShopInfo;
|
|
389
|
+
private taskOk;
|
|
390
|
+
private taskFail;
|
|
391
|
+
private taskTimeout;
|
|
392
|
+
private getShortNumberOrDeviceId;
|
|
393
|
+
private buildCheckoutTaskIdempotencyKey;
|
|
394
|
+
private isBlankCheckoutValue;
|
|
395
|
+
private isLocalCheckoutOrderId;
|
|
396
|
+
private normalizeCheckoutSubmitData;
|
|
397
|
+
private ensureCheckoutOrderNumbers;
|
|
398
|
+
private dispatchCheckoutSyncTask;
|
|
399
|
+
private dispatchPrintOtherReceiptTask;
|
|
400
|
+
private buildPrintOtherReceiptIdempotencyKey;
|
|
401
|
+
private getPrintOrderIdentity;
|
|
402
|
+
private dispatchLocalReceiptPrint;
|
|
403
|
+
private shouldLookupLocalPrintOrder;
|
|
404
|
+
private getLocalPrintOrderLookup;
|
|
405
|
+
private handleLocalPrintOrder;
|
|
406
|
+
private handleOrderCheckoutSubmit;
|
|
407
|
+
private handleSyncCheckoutSubmit;
|
|
408
|
+
private handlePendingSyncCheckoutOrder;
|
|
409
|
+
private buildPendingSyncCheckoutOrder;
|
|
410
|
+
private shouldBuildSmallTicketData;
|
|
411
|
+
private shouldPrintSyncedOrder;
|
|
412
|
+
private hasPaymentStatus;
|
|
413
|
+
private isSalesOrderFullyPaid;
|
|
414
|
+
private sumPaidOrderPayments;
|
|
415
|
+
private toAmountNumber;
|
|
416
|
+
private buildSmallTicketProductMap;
|
|
417
|
+
private withPendingSyncProductTitles;
|
|
418
|
+
private buildProductTitleSnapshot;
|
|
419
|
+
private getProductTitleSnapshotCurrentLocale;
|
|
420
|
+
private normalizeProductTitleSnapshotLocale;
|
|
421
|
+
private resolveProductTitleValue;
|
|
422
|
+
private canAssignStringProductTitleToLocale;
|
|
423
|
+
private hasCjkText;
|
|
424
|
+
private resolveFirstProductTitleValue;
|
|
425
|
+
private withLocalSmallTicketData;
|
|
287
426
|
private handleOrderSalesDetail;
|
|
288
427
|
/**
|
|
289
428
|
* 解析 order_ids 入参,兼容 url query / data 字段、字符串(csv) / 数组两种形态。
|
|
@@ -311,8 +450,22 @@ declare class Server {
|
|
|
311
450
|
* 从 url 中解析指定 query 参数,兼容相对路径与绝对路径
|
|
312
451
|
*/
|
|
313
452
|
private extractQueryParam;
|
|
314
|
-
private
|
|
453
|
+
private extractOrderSalesDetailLookup;
|
|
454
|
+
private shouldForceRemoteSalesDetail;
|
|
315
455
|
private buildOrderSalesDetailBackendPath;
|
|
456
|
+
private extractOrderDataFromCheckoutResponse;
|
|
457
|
+
private getCheckoutExternalSaleNumber;
|
|
458
|
+
private buildCheckoutSyncSuccessPatch;
|
|
459
|
+
private buildSyncedOrderForPrint;
|
|
460
|
+
private isMergeableCheckoutOrder;
|
|
461
|
+
private normalizeCheckoutResponse;
|
|
462
|
+
private withSyncedOrderIdInCheckoutResponse;
|
|
463
|
+
private isCheckoutResponseRejected;
|
|
464
|
+
private getUnknownErrorMessage;
|
|
465
|
+
private normalizeUnknownError;
|
|
466
|
+
private safeJsonClone;
|
|
467
|
+
private extractBackendErrorResponse;
|
|
468
|
+
private isExplicitBackendErrorResponse;
|
|
316
469
|
/**
|
|
317
470
|
* 从 url 或路由 path 解析 pathname(不含 query,去掉末尾 /)
|
|
318
471
|
*/
|
|
@@ -348,6 +501,27 @@ declare class Server {
|
|
|
348
501
|
* 从订单中展开 bookings,再按条件筛选 + 分页
|
|
349
502
|
*/
|
|
350
503
|
private computeBookingQueryResult;
|
|
504
|
+
/**
|
|
505
|
+
* 规范商品扩展类型过滤参数。
|
|
506
|
+
*
|
|
507
|
+
* @example
|
|
508
|
+
* const types = this.normalizeProductExtensionTypes(['product_add_time']);
|
|
509
|
+
*/
|
|
510
|
+
private normalizeProductExtensionTypes;
|
|
511
|
+
/**
|
|
512
|
+
* 请求包含 product_add_time 时,按传入 extension_type 数组配置过滤商品。
|
|
513
|
+
*
|
|
514
|
+
* @example
|
|
515
|
+
* const list = this.filterProductsByExtensionTypes(products, ['product_add_time']);
|
|
516
|
+
*/
|
|
517
|
+
private filterProductsByExtensionTypes;
|
|
518
|
+
/**
|
|
519
|
+
* 判断本次查询是否需要跳过餐牌过滤,直接按扩展类型拉商品。
|
|
520
|
+
*
|
|
521
|
+
* @example
|
|
522
|
+
* const skipMenu = this.shouldQueryProductsByExtensionTypes(['product_add_time']);
|
|
523
|
+
*/
|
|
524
|
+
private shouldQueryProductsByExtensionTypes;
|
|
351
525
|
/**
|
|
352
526
|
* 商品查询的核心计算逻辑(编排 Products、Menu、Schedule 模块)
|
|
353
527
|
* 供 handleProductQuery 首次返回及 pubsub 变更推送复用
|
|
@@ -367,6 +541,35 @@ declare class Server {
|
|
|
367
541
|
* 订单数据变更后,遍历订阅者重新计算并通过 callback 推送
|
|
368
542
|
*/
|
|
369
543
|
private recomputeAndNotifyOrderQuery;
|
|
544
|
+
/**
|
|
545
|
+
* 订单变更后通知 sales 搜索订阅者。
|
|
546
|
+
* 仅回传当前查询已返回订单号集合中的变更订单。
|
|
547
|
+
*
|
|
548
|
+
* @example
|
|
549
|
+
* this.notifySalesSearchSubscribers({ list: [], changedOrders: [order], source: 'pubsub.bodyUpsert' })
|
|
550
|
+
*/
|
|
551
|
+
private notifySalesSearchSubscribers;
|
|
552
|
+
/**
|
|
553
|
+
* 从订单变更事件中提取明确 delta。
|
|
554
|
+
*
|
|
555
|
+
* @example
|
|
556
|
+
* const list = this.extractChangedOrdersFromPayload(payload)
|
|
557
|
+
*/
|
|
558
|
+
private extractChangedOrdersFromPayload;
|
|
559
|
+
/**
|
|
560
|
+
* 构建与当前搜索接口一致的 delta 响应。
|
|
561
|
+
*
|
|
562
|
+
* @example
|
|
563
|
+
* const response = this.buildSalesSearchDeltaResponse(subscriber, [order])
|
|
564
|
+
*/
|
|
565
|
+
private buildSalesSearchDeltaResponse;
|
|
566
|
+
/**
|
|
567
|
+
* 构建聚合搜索接口的 sales 分组 delta 响应。
|
|
568
|
+
*
|
|
569
|
+
* @example
|
|
570
|
+
* const response = this.buildAggregateSalesSearchDeltaResponse(subscriber, [order])
|
|
571
|
+
*/
|
|
572
|
+
private buildAggregateSalesSearchDeltaResponse;
|
|
370
573
|
/**
|
|
371
574
|
* 预约数据变更后,遍历订阅者重新计算并通过 callback 推送
|
|
372
575
|
*/
|