@pisell/pisellos 2.3.199 → 2.3.200
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/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/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";
|
|
@@ -389,7 +389,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
389
389
|
};
|
|
390
390
|
setOtherData(key: string, value: any): void;
|
|
391
391
|
getOtherData(key: string): any;
|
|
392
|
-
getProductTypeById(id: number): Promise<"
|
|
392
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
393
393
|
/**
|
|
394
394
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
395
395
|
*
|
|
@@ -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 客户状态
|
|
@@ -389,7 +389,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
389
389
|
};
|
|
390
390
|
setOtherData(key: string, value: any): void;
|
|
391
391
|
getOtherData(key: string): any;
|
|
392
|
-
getProductTypeById(id: number): Promise<"
|
|
392
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
393
393
|
/**
|
|
394
394
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
395
395
|
*
|
|
@@ -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 客户状态
|