@pisell/pisellos 2.1.171 → 2.1.173
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/index.d.ts +0 -1
- package/dist/index.js +0 -3
- package/dist/model/strategy/adapter/index.d.ts +0 -4
- package/dist/model/strategy/adapter/index.js +1 -5
- package/dist/modules/Discount/index.d.ts +2 -5
- package/dist/modules/Discount/index.js +1 -21
- package/dist/modules/Discount/types.d.ts +0 -4
- package/dist/modules/Order/index.d.ts +0 -1
- package/dist/modules/Order/index.js +6 -18
- package/dist/modules/Order/types.d.ts +0 -2
- package/dist/modules/ProductList/index.d.ts +1 -3
- package/dist/modules/ProductList/index.js +11 -22
- package/dist/modules/Schedule/getDateIsInSchedule.js +0 -5
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/dist/solution/ScanOrder/index.js +1 -1
- package/dist/solution/ShopDiscount/index.js +15 -16
- package/dist/solution/VenueBooking/index.d.ts +3 -59
- package/dist/solution/VenueBooking/index.js +299 -771
- package/dist/solution/VenueBooking/types.d.ts +1 -3
- package/dist/solution/VenueBooking/types.js +0 -1
- package/dist/solution/VenueBooking/utils/dateSummary.d.ts +2 -2
- package/dist/solution/VenueBooking/utils/dateSummary.js +25 -12
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +6 -0
- package/dist/solution/VenueBooking/utils/slotMerge.js +9 -3
- package/dist/solution/VenueBooking/utils/timeSlot.d.ts +0 -2
- package/dist/solution/VenueBooking/utils/timeSlot.js +4 -9
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/lib/model/strategy/adapter/index.d.ts +0 -4
- package/lib/model/strategy/adapter/index.js +2 -13
- package/lib/modules/Discount/index.d.ts +2 -5
- package/lib/modules/Discount/index.js +1 -11
- package/lib/modules/Discount/types.d.ts +0 -4
- package/lib/modules/Order/index.d.ts +0 -1
- package/lib/modules/Order/index.js +1 -11
- package/lib/modules/Order/types.d.ts +0 -2
- package/lib/modules/ProductList/index.d.ts +1 -3
- package/lib/modules/ProductList/index.js +40 -46
- package/lib/modules/Schedule/getDateIsInSchedule.js +0 -4
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/lib/solution/ScanOrder/index.js +1 -1
- package/lib/solution/ShopDiscount/index.js +2 -3
- package/lib/solution/VenueBooking/index.d.ts +3 -59
- package/lib/solution/VenueBooking/index.js +111 -550
- package/lib/solution/VenueBooking/types.d.ts +1 -3
- package/lib/solution/VenueBooking/types.js +0 -1
- package/lib/solution/VenueBooking/utils/dateSummary.d.ts +2 -2
- package/lib/solution/VenueBooking/utils/dateSummary.js +10 -5
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +6 -0
- package/lib/solution/VenueBooking/utils/slotMerge.js +4 -3
- package/lib/solution/VenueBooking/utils/timeSlot.d.ts +0 -2
- package/lib/solution/VenueBooking/utils/timeSlot.js +3 -7
- package/package.json +2 -2
- package/dist/model/strategy/adapter/dataVariant/adapter.d.ts +0 -50
- package/dist/model/strategy/adapter/dataVariant/adapter.js +0 -167
- package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts +0 -89
- package/dist/model/strategy/adapter/dataVariant/evaluator.js +0 -780
- package/dist/model/strategy/adapter/dataVariant/examples.d.ts +0 -39
- package/dist/model/strategy/adapter/dataVariant/examples.js +0 -277
- package/dist/model/strategy/adapter/dataVariant/index.d.ts +0 -4
- package/dist/model/strategy/adapter/dataVariant/index.js +0 -4
- package/dist/model/strategy/adapter/dataVariant/type.d.ts +0 -148
- package/dist/model/strategy/adapter/dataVariant/type.js +0 -54
- package/dist/solution/VenueBooking/utils/smartPricing.d.ts +0 -70
- package/dist/solution/VenueBooking/utils/smartPricing.js +0 -233
- package/lib/model/strategy/adapter/dataVariant/adapter.d.ts +0 -50
- package/lib/model/strategy/adapter/dataVariant/adapter.js +0 -149
- package/lib/model/strategy/adapter/dataVariant/evaluator.d.ts +0 -89
- package/lib/model/strategy/adapter/dataVariant/evaluator.js +0 -583
- package/lib/model/strategy/adapter/dataVariant/examples.d.ts +0 -39
- package/lib/model/strategy/adapter/dataVariant/examples.js +0 -293
- package/lib/model/strategy/adapter/dataVariant/index.d.ts +0 -4
- package/lib/model/strategy/adapter/dataVariant/index.js +0 -38
- package/lib/model/strategy/adapter/dataVariant/type.d.ts +0 -148
- package/lib/model/strategy/adapter/dataVariant/type.js +0 -31
- package/lib/solution/VenueBooking/utils/smartPricing.d.ts +0 -70
- package/lib/solution/VenueBooking/utils/smartPricing.js +0 -180
|
@@ -3,7 +3,6 @@ import { BaseModule } from '../../modules/BaseModule';
|
|
|
3
3
|
import { VenueBookingAddLogParams, VenueBookingSlotConfig, VenueDateSummaryItem, VenueSlotSelection, VenueTimeSlotGrid } from './types';
|
|
4
4
|
import type { ScanOrderOrderProduct, ScanOrderOrderProductIdentity } from '../ScanOrder/types';
|
|
5
5
|
import type { UpdateProductInOrderParams } from '../../modules/Order/types';
|
|
6
|
-
import type { ScheduleItem } from '../../modules/Schedule/types';
|
|
7
6
|
import type { OpenDataAvailabilityResult } from '../../modules/OpenData';
|
|
8
7
|
import type { ProductData } from '../../modules/Product/types';
|
|
9
8
|
import { type CartItemSummary, type PaxInfo, type QuantityCheckResult, type QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
|
|
@@ -18,7 +17,6 @@ interface VenueBookingItemRuleRuntimeConfig {
|
|
|
18
17
|
custom?: Record<string, any>;
|
|
19
18
|
}
|
|
20
19
|
export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
21
|
-
private static readonly PRICING_DEBUG_CACHE_ID;
|
|
22
20
|
protected defaultName: string;
|
|
23
21
|
protected defaultVersion: string;
|
|
24
22
|
isSolution: boolean;
|
|
@@ -38,32 +36,15 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
38
36
|
private loginEffectDisposers;
|
|
39
37
|
private customerLoginRefreshInFlight;
|
|
40
38
|
private customerLoginRefreshIdInFlight;
|
|
41
|
-
/** 最近一次确认登录的客户;登录事件与 user 插件更新之间可能存在时序差。 */
|
|
42
|
-
private smartPricingCustomerId;
|
|
43
39
|
private loadAllProductsInFlight;
|
|
44
40
|
private productsLoaded;
|
|
45
41
|
private loadOpenDataConfigInFlight;
|
|
46
42
|
private static readonly OPEN_DATA_CACHE_TTL;
|
|
47
|
-
/** 按日期缓存 slot 智能定价 Map,避免同周重复 resolveProducts */
|
|
48
|
-
private slotPriceMapCache;
|
|
49
|
-
/** loadProducts 后缓存的全量商品(venue + addon),供分段算价复用 */
|
|
50
|
-
private smartPricingProductCatalog;
|
|
51
|
-
private static readonly PISELL1_LOGIN_SUCCESS;
|
|
52
43
|
private getLoggerContext;
|
|
53
44
|
private safeStringify;
|
|
54
45
|
private pickErrorMessage;
|
|
55
46
|
private serializeError;
|
|
56
47
|
private addVenueBookingLog;
|
|
57
|
-
/**
|
|
58
|
-
* 临时线上排查日志:
|
|
59
|
-
* - 仅对指定页面 cacheId 开启,避免影响其他页面
|
|
60
|
-
* - 不 await,且吞掉日志上报异常,保证日志系统不会阻断登录/商品加载主流程
|
|
61
|
-
*/
|
|
62
|
-
private logPricingDiagnostics;
|
|
63
|
-
private isPricingDiagnosticsEnabled;
|
|
64
|
-
private getAvailableWalletIdsForDiagnostics;
|
|
65
|
-
private getOrderPricingSnapshotForDiagnostics;
|
|
66
|
-
private getCatalogPricingSnapshotForDiagnostics;
|
|
67
48
|
private logMethodStart;
|
|
68
49
|
private logMethodSuccess;
|
|
69
50
|
private logMethodError;
|
|
@@ -87,22 +68,6 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
87
68
|
passed: boolean | null;
|
|
88
69
|
failures: QuantityCheckResult[];
|
|
89
70
|
};
|
|
90
|
-
/** 清除 slot 价格分段缓存(商品重载 / 登录后 customerId 变化时调用) */
|
|
91
|
-
private clearSlotPriceMapCache;
|
|
92
|
-
/** 读取当前登录 customerId */
|
|
93
|
-
private resolveCustomerIdForSmartPricing;
|
|
94
|
-
private resolveAvailableWalletIdsForSmartPricing;
|
|
95
|
-
/** 读取 schedule 全量列表,供智能定价 schedule_match 使用 */
|
|
96
|
-
private getScheduleListForSmartPricing;
|
|
97
|
-
/** 构建智能定价上下文,对齐 OS Server buildProductFormatterContext */
|
|
98
|
-
private buildSmartPricingContext;
|
|
99
|
-
/** venue + addon 全量商品,供智能定价评估 */
|
|
100
|
-
private getAllProductsForSmartPricing;
|
|
101
|
-
private getSlotPriceMapCacheKey;
|
|
102
|
-
/**
|
|
103
|
-
* 按 schedule 分段构建 slot 价格 Map,带实例级缓存。
|
|
104
|
-
*/
|
|
105
|
-
private buildSlotPriceMapForDate;
|
|
106
71
|
loadAllProducts(): Promise<{
|
|
107
72
|
venueProducts: ProductData[];
|
|
108
73
|
addonProducts: ProductData[];
|
|
@@ -175,7 +140,8 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
175
140
|
setSlotConfig(config: Partial<VenueBookingSlotConfig>): void;
|
|
176
141
|
getSlotConfig(): VenueBookingSlotConfig;
|
|
177
142
|
loadSchedules(): Promise<void>;
|
|
178
|
-
|
|
143
|
+
private injectScheduleResolverToQuotation;
|
|
144
|
+
getScheduleListByIds(ids: number[]): import("../../modules/Schedule/types").ScheduleItem[];
|
|
179
145
|
getTempOrder(): import("./types").ScanOrderTempOrder | null;
|
|
180
146
|
updateTempOrderNote(note: string): string;
|
|
181
147
|
updateTempOrderContactsInfo(contactsInfo: any[]): any[];
|
|
@@ -183,20 +149,7 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
183
149
|
onCustomerLogin(params: {
|
|
184
150
|
customerId: number;
|
|
185
151
|
}): Promise<void>;
|
|
186
|
-
|
|
187
|
-
* 接收 pisell2 VenueBooking 登录链路诊断日志。
|
|
188
|
-
* 实际是否上报仍由 OS 内部 cacheId 白名单统一控制。
|
|
189
|
-
*/
|
|
190
|
-
logPricingDiagnosticsFromClient(params: {
|
|
191
|
-
title: string;
|
|
192
|
-
payload?: Record<string, any>;
|
|
193
|
-
}): void;
|
|
194
|
-
private recalculateOrderPricesFromSmartPricing;
|
|
195
|
-
/**
|
|
196
|
-
* DataVariant 重算价格后,同步刷新订单展示、Rules 与 Summary 共用的价格口径。
|
|
197
|
-
* Rules 会在本轮结束后根据当前客户的 discountList 重新写入实际折扣。
|
|
198
|
-
*/
|
|
199
|
-
private resetProductPriceForSmartPricing;
|
|
152
|
+
private recalculateOrderPricesFromQuotation;
|
|
200
153
|
scanCode(code: string, customerId?: number): Promise<{
|
|
201
154
|
isAvailable: boolean;
|
|
202
155
|
discountList: import("../../modules/Discount").Discount[];
|
|
@@ -211,15 +164,6 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
|
|
|
211
164
|
discountId: number;
|
|
212
165
|
isSelected: boolean;
|
|
213
166
|
}): Promise<import("../../modules/Discount").Discount[]>;
|
|
214
|
-
/**
|
|
215
|
-
* 统一 VenueBooking 折扣后的订单行价。
|
|
216
|
-
*
|
|
217
|
-
* Rules 的 `discount_list.amount` 是已经按适用规则计算出的每件优惠额;它是这里唯一
|
|
218
|
-
* 的折扣金额来源。使用智能定价写入的 source_product_price 减去该金额,再同步
|
|
219
|
-
* selling_price 与 Summary 使用的 main_product_selling_price,避免 UI 的购物车行价、
|
|
220
|
-
* 小计和提交订单各自读取到不同的价格字段。
|
|
221
|
-
*/
|
|
222
|
-
private normalizeDiscountedOrderPrices;
|
|
223
167
|
addNewOrder(): Promise<import("./types").ScanOrderTempOrder>;
|
|
224
168
|
getOrderProducts(): ScanOrderOrderProduct[];
|
|
225
169
|
getSummary(): Promise<import("./types").ScanOrderSummary>;
|