@pisell/pisellos 2.0.23 → 2.0.24
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.
|
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
|
|
|
49
49
|
getCategories(): ProductCategory[];
|
|
50
50
|
setOtherParams(key: string, value: any): void;
|
|
51
51
|
getOtherParams(): any;
|
|
52
|
-
getProductType(): "
|
|
52
|
+
getProductType(): "normal" | "duration" | "session";
|
|
53
53
|
}
|
|
@@ -107,7 +107,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
// 合并新旧折扣列表,并计算折扣结果
|
|
110
|
-
var mergedDiscountList = uniqueById([].concat(_toConsumableArray(oldDiscountList), _toConsumableArray(newDiscountList)));
|
|
110
|
+
var mergedDiscountList = uniqueById(uniqueById([].concat(_toConsumableArray(oldDiscountList), _toConsumableArray(newDiscountList))), 'product_id');
|
|
111
111
|
var result = this.calcDiscount({
|
|
112
112
|
discountList: mergedDiscountList,
|
|
113
113
|
productList: _toConsumableArray(productList)
|
|
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
|
|
|
49
49
|
getCategories(): ProductCategory[];
|
|
50
50
|
setOtherParams(key: string, value: any): void;
|
|
51
51
|
getOtherParams(): any;
|
|
52
|
-
getProductType(): "
|
|
52
|
+
getProductType(): "normal" | "duration" | "session";
|
|
53
53
|
}
|
|
@@ -58,10 +58,10 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
58
58
|
productList
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
const mergedDiscountList = (0, import_utils.uniqueById)([
|
|
61
|
+
const mergedDiscountList = (0, import_utils.uniqueById)((0, import_utils.uniqueById)([
|
|
62
62
|
...oldDiscountList,
|
|
63
63
|
...newDiscountList
|
|
64
|
-
]);
|
|
64
|
+
]), "product_id");
|
|
65
65
|
const result = this.calcDiscount({
|
|
66
66
|
discountList: mergedDiscountList,
|
|
67
67
|
productList: [...productList]
|