@pisell/pisellos 2.2.245 → 2.2.246
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/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +6 -3
- package/dist/modules/Order/index.d.ts +4 -1
- package/dist/modules/Order/index.js +320 -202
- package/dist/server/modules/order/index.js +7 -3
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +5 -2
- package/lib/modules/Order/index.d.ts +4 -1
- package/lib/modules/Order/index.js +76 -5
- package/lib/server/modules/order/index.js +7 -3
- 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 } from "./examples";
|
|
@@ -75,7 +75,7 @@ function mapOrderBundleToOtherBundle(bundle) {
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
export function buildNormalProductCacheItemFromOrderLine(input) {
|
|
78
|
-
var _product$product_id, _product$selling_pric2, _product$original_pri, _product$metadata, _product$metadata2, _product$product_vari, _originExtend$other, _product$num, _product$product_vari2, _product$num2, _title, _product$note, _originExtend$price, _originExtend$total, _originExtend$origin_, _price3, _product$order_detail;
|
|
78
|
+
var _product$product_id, _product$selling_pric2, _product$original_pri, _product$metadata, _product$metadata2, _product$product_vari, _originExtend$other, _product$num, _product$product_vari2, _product$num2, _title, _product$note, _originExtend$price, _originExtend$total, _originExtend$origin_, _product$metadata3, _ref6, _title2, _price3, _product$order_detail;
|
|
79
79
|
var product = input.product,
|
|
80
80
|
sourceProduct = input.sourceProduct;
|
|
81
81
|
var resolvedId = (_product$product_id = product.product_id) !== null && _product$product_id !== void 0 ? _product$product_id : sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.id;
|
|
@@ -112,7 +112,10 @@ export function buildNormalProductCacheItemFromOrderLine(input) {
|
|
|
112
112
|
other: other,
|
|
113
113
|
skuValue: JSON.parse(JSON.stringify(skuValue)),
|
|
114
114
|
_skuValue: JSON.parse(JSON.stringify(skuValue)),
|
|
115
|
-
isNormalProduct: true
|
|
115
|
+
isNormalProduct: true,
|
|
116
|
+
metadata: {
|
|
117
|
+
product_add_schedule_time: (_product$metadata3 = product.metadata) === null || _product$metadata3 === void 0 ? void 0 : _product$metadata3.product_add_schedule_time
|
|
118
|
+
}
|
|
116
119
|
}, productOptionString ? {
|
|
117
120
|
product_option_string: productOptionString
|
|
118
121
|
} : {}), (originExtend === null || originExtend === void 0 ? void 0 : originExtend.priceOverride) !== undefined ? {
|
|
@@ -128,7 +131,7 @@ export function buildNormalProductCacheItemFromOrderLine(input) {
|
|
|
128
131
|
id: resolvedId,
|
|
129
132
|
product_id: resolvedId,
|
|
130
133
|
_id: uid,
|
|
131
|
-
title: sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.title,
|
|
134
|
+
title: (_ref6 = (_title2 = sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.title) !== null && _title2 !== void 0 ? _title2 : product.product_title) !== null && _ref6 !== void 0 ? _ref6 : '',
|
|
132
135
|
price: (_price3 = sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.price) !== null && _price3 !== void 0 ? _price3 : sourcePrice,
|
|
133
136
|
selling_price: product.selling_price,
|
|
134
137
|
original_price: product.original_price
|
|
@@ -179,6 +179,9 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
179
179
|
private buildOrderProductsFingerprint;
|
|
180
180
|
private buildProductStructuralFingerprintItem;
|
|
181
181
|
private buildOrderProductsStructuralFingerprint;
|
|
182
|
+
private getManualDepositOverride;
|
|
183
|
+
private setManualDepositOverride;
|
|
184
|
+
private clearManualDepositOverride;
|
|
182
185
|
private getOriginalSalesSnapshot;
|
|
183
186
|
private isSnapshotPayableAmountUnchanged;
|
|
184
187
|
private restoreOriginalSnapshotIfProductsUnchanged;
|
|
@@ -422,7 +425,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
422
425
|
generateIdempotencyToken(): string;
|
|
423
426
|
syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
|
|
424
427
|
createOrder(params: CommitOrderParams['query']): {
|
|
425
|
-
type: "
|
|
428
|
+
type: "virtual" | "appointment_booking";
|
|
426
429
|
platform: string;
|
|
427
430
|
sales_channel: string;
|
|
428
431
|
order_sales_channel: string;
|