@pisell/pisellos 2.3.199 → 2.3.201
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/index.js +9 -0
- package/dist/modules/ProductList/index.js +3 -0
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingByStep/index.js +3 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/lib/modules/ProductList/index.js +3 -0
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingByStep/index.js +3 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// 导出评估器
|
|
2
|
+
export { PromotionEvaluator } from "./evaluator";
|
|
3
|
+
|
|
4
|
+
// 导出适配器
|
|
5
|
+
export { PromotionAdapter } from "./adapter";
|
|
6
|
+
export { default } from "./adapter";
|
|
7
|
+
|
|
8
|
+
// 导出策略配置示例常量
|
|
9
|
+
export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY, ITEM_REWARD_STRATEGY } from "./examples";
|
|
@@ -438,6 +438,9 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
438
438
|
channel = (_this$otherParams5 = this.otherParams) === null || _this$otherParams5 === void 0 ? void 0 : _this$otherParams5.channel;
|
|
439
439
|
_context7.next = 5;
|
|
440
440
|
return this.request.post('/product/query', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
441
|
+
// Bypass the endpoint cache when seeding this pool; subsequent reads still
|
|
442
|
+
// reuse the venue catalog session's single local snapshot.
|
|
443
|
+
force_ignore_cache_flag: 1,
|
|
441
444
|
// The customer endpoint otherwise filters out future/variant members.
|
|
442
445
|
open_quotation: 0,
|
|
443
446
|
open_bundle: 1,
|
|
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
342
342
|
date: string;
|
|
343
343
|
status: string;
|
|
344
344
|
week: string;
|
|
345
|
-
weekNum: 0 |
|
|
345
|
+
weekNum: 0 | 2 | 1 | 3 | 5 | 4 | 6;
|
|
346
346
|
}[]>;
|
|
347
347
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
348
348
|
private getScheduleDataByIds;
|
|
@@ -3381,10 +3381,12 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
3381
3381
|
}
|
|
3382
3382
|
});
|
|
3383
3383
|
});
|
|
3384
|
-
|
|
3384
|
+
var peakUsedCapacity = getPeakConcurrentPax(Array.from(mSet.values()), {
|
|
3385
3385
|
start_at: dayjs(item.start),
|
|
3386
3386
|
end_at: dayjs(item.end)
|
|
3387
3387
|
});
|
|
3388
|
+
// 单个资源的超额占用不能扣减其他资源的可用容量。
|
|
3389
|
+
acc += Math.min(curr.capacity, peakUsedCapacity);
|
|
3388
3390
|
return acc;
|
|
3389
3391
|
}, 0);
|
|
3390
3392
|
// 如果已使用容量超过了当前类型资源的容量,则不可用
|
|
@@ -366,7 +366,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
366
366
|
* 获取当前的客户搜索条件
|
|
367
367
|
* @returns 当前搜索条件
|
|
368
368
|
*/
|
|
369
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
369
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
370
370
|
/**
|
|
371
371
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
372
372
|
* @returns 客户状态
|
|
@@ -276,6 +276,9 @@ class ProductList extends _BaseModule.BaseModule {
|
|
|
276
276
|
};
|
|
277
277
|
const channel = this.otherParams?.channel;
|
|
278
278
|
const response = await this.request.post('/product/query', {
|
|
279
|
+
// Bypass the endpoint cache when seeding this pool; subsequent reads still
|
|
280
|
+
// reuse the venue catalog session's single local snapshot.
|
|
281
|
+
force_ignore_cache_flag: 1,
|
|
279
282
|
// The customer endpoint otherwise filters out future/variant members.
|
|
280
283
|
open_quotation: 0,
|
|
281
284
|
open_bundle: 1,
|
|
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
342
342
|
date: string;
|
|
343
343
|
status: string;
|
|
344
344
|
week: string;
|
|
345
|
-
weekNum: 0 |
|
|
345
|
+
weekNum: 0 | 2 | 1 | 3 | 5 | 4 | 6;
|
|
346
346
|
}[]>;
|
|
347
347
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
348
348
|
private getScheduleDataByIds;
|
|
@@ -2407,10 +2407,12 @@ class BookingByStepImpl extends _BaseModule.BaseModule {
|
|
|
2407
2407
|
}
|
|
2408
2408
|
});
|
|
2409
2409
|
});
|
|
2410
|
-
|
|
2410
|
+
const peakUsedCapacity = (0, _resources.getPeakConcurrentPax)(Array.from(mSet.values()), {
|
|
2411
2411
|
start_at: (0, _dayjs.default)(item.start),
|
|
2412
2412
|
end_at: (0, _dayjs.default)(item.end)
|
|
2413
2413
|
});
|
|
2414
|
+
// 单个资源的超额占用不能扣减其他资源的可用容量。
|
|
2415
|
+
acc += Math.min(curr.capacity, peakUsedCapacity);
|
|
2414
2416
|
return acc;
|
|
2415
2417
|
}, 0);
|
|
2416
2418
|
// 如果已使用容量超过了当前类型资源的容量,则不可用
|
|
@@ -366,7 +366,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
366
366
|
* 获取当前的客户搜索条件
|
|
367
367
|
* @returns 当前搜索条件
|
|
368
368
|
*/
|
|
369
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
369
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
370
370
|
/**
|
|
371
371
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
372
372
|
* @returns 客户状态
|