@pisell/pisellos 2.3.61 → 2.3.63
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/server/index.js +1 -2
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/lib/model/strategy/adapter/promotion/index.js +51 -0
- package/lib/server/index.js +3 -15
- package/lib/solution/BookingByStep/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";
|
package/dist/server/index.js
CHANGED
|
@@ -1243,8 +1243,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
1243
1243
|
checkoutData: checkoutData,
|
|
1244
1244
|
order: printableOrder,
|
|
1245
1245
|
response: null,
|
|
1246
|
-
requireFullyPaid: false
|
|
1247
|
-
isManualPrint: true
|
|
1246
|
+
requireFullyPaid: false
|
|
1248
1247
|
});
|
|
1249
1248
|
case 27:
|
|
1250
1249
|
printResult = _context19.sent;
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 |
|
|
329
|
+
weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/model/strategy/adapter/promotion/index.ts
|
|
30
|
+
var promotion_exports = {};
|
|
31
|
+
__export(promotion_exports, {
|
|
32
|
+
BUY_X_GET_Y_FREE_STRATEGY: () => import_examples.BUY_X_GET_Y_FREE_STRATEGY,
|
|
33
|
+
ITEM_REWARD_STRATEGY: () => import_examples.ITEM_REWARD_STRATEGY,
|
|
34
|
+
PromotionAdapter: () => import_adapter.PromotionAdapter,
|
|
35
|
+
PromotionEvaluator: () => import_evaluator.PromotionEvaluator,
|
|
36
|
+
X_ITEMS_FOR_Y_PRICE_STRATEGY: () => import_examples.X_ITEMS_FOR_Y_PRICE_STRATEGY,
|
|
37
|
+
default: () => import_adapter2.default
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(promotion_exports);
|
|
40
|
+
var import_evaluator = require("./evaluator");
|
|
41
|
+
var import_adapter = require("./adapter");
|
|
42
|
+
var import_adapter2 = __toESM(require("./adapter"));
|
|
43
|
+
var import_examples = require("./examples");
|
|
44
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
45
|
+
0 && (module.exports = {
|
|
46
|
+
BUY_X_GET_Y_FREE_STRATEGY,
|
|
47
|
+
ITEM_REWARD_STRATEGY,
|
|
48
|
+
PromotionAdapter,
|
|
49
|
+
PromotionEvaluator,
|
|
50
|
+
X_ITEMS_FOR_Y_PRICE_STRATEGY
|
|
51
|
+
});
|
package/lib/server/index.js
CHANGED
|
@@ -795,8 +795,7 @@ var Server = class {
|
|
|
795
795
|
checkoutData,
|
|
796
796
|
order: printableOrder,
|
|
797
797
|
response: null,
|
|
798
|
-
requireFullyPaid: false
|
|
799
|
-
isManualPrint: true
|
|
798
|
+
requireFullyPaid: false
|
|
800
799
|
});
|
|
801
800
|
return {
|
|
802
801
|
code: 200,
|
|
@@ -1688,22 +1687,11 @@ var Server = class {
|
|
|
1688
1687
|
return;
|
|
1689
1688
|
}
|
|
1690
1689
|
try {
|
|
1690
|
+
await this.schedule.loadAllSchedule();
|
|
1691
1691
|
this.products.clearPriceCache();
|
|
1692
1692
|
await this.products.setupQuotationPriceBridge({
|
|
1693
1693
|
scheduleModule: this.schedule,
|
|
1694
|
-
channel: (_a = this.core.context) == null ? void 0 : _a.channel
|
|
1695
|
-
onQuotationUpdated: () => {
|
|
1696
|
-
void this.recomputeAndNotifyProductQuery();
|
|
1697
|
-
}
|
|
1698
|
-
});
|
|
1699
|
-
void this.schedule.loadAllSchedule().then(() => {
|
|
1700
|
-
var _a2;
|
|
1701
|
-
(_a2 = this.products) == null ? void 0 : _a2.clearPriceCache();
|
|
1702
|
-
void this.recomputeAndNotifyProductQuery();
|
|
1703
|
-
}).catch((error) => {
|
|
1704
|
-
this.logWarning("Products 报价单价格桥接后台刷新 Schedule 失败,继续使用本地数据", {
|
|
1705
|
-
error: error instanceof Error ? error.message : String(error)
|
|
1706
|
-
});
|
|
1694
|
+
channel: (_a = this.core.context) == null ? void 0 : _a.channel
|
|
1707
1695
|
});
|
|
1708
1696
|
this.logInfo("Products 报价单价格桥接初始化完成");
|
|
1709
1697
|
} catch (error) {
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 |
|
|
329
|
+
weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|