@pisell/pisellos 2.2.32 → 2.2.34
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/modules/Product/index.d.ts +1 -1
- package/dist/modules/Product/types.d.ts +2 -0
- package/dist/server/modules/menu/index.js +1 -1
- package/dist/server/modules/schedule/index.js +1 -1
- package/dist/server/utils/product.js +3 -3
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/Product/types.d.ts +2 -0
- package/lib/server/modules/menu/index.js +1 -1
- package/lib/server/modules/schedule/index.js +1 -1
- package/lib/server/utils/product.js +2 -2
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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(): "duration" | "session" | "normal";
|
|
53
53
|
}
|
|
@@ -162,6 +162,8 @@ export interface ProductData {
|
|
|
162
162
|
categories: ProductCategory[];
|
|
163
163
|
/** 套餐组 */
|
|
164
164
|
bundle_groups: ProductBundleGroup[];
|
|
165
|
+
/** 套餐组 */
|
|
166
|
+
bundle_group: ProductBundleGroup[];
|
|
165
167
|
/** 商品资源 */
|
|
166
168
|
product_resource?: {
|
|
167
169
|
resources?: ProductResourceItem[];
|
|
@@ -212,7 +212,7 @@ export var MenuModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
212
212
|
key: "getMenuByIds",
|
|
213
213
|
value: function getMenuByIds(ids) {
|
|
214
214
|
if (!ids || ids.length === 0) {
|
|
215
|
-
this.
|
|
215
|
+
this.logInfo('getMenuByIds: 未提供有效的 ids', {
|
|
216
216
|
idsCount: 0
|
|
217
217
|
});
|
|
218
218
|
return [];
|
|
@@ -258,7 +258,7 @@ export var ScheduleModuleEx = /*#__PURE__*/function (_BaseModule) {
|
|
|
258
258
|
key: "getScheduleByIds",
|
|
259
259
|
value: function getScheduleByIds(ids) {
|
|
260
260
|
if (!ids || ids.length === 0) {
|
|
261
|
-
this.
|
|
261
|
+
this.logInfo('getScheduleByIds: 未提供有效的 ids', {
|
|
262
262
|
idsCount: 0
|
|
263
263
|
});
|
|
264
264
|
return [];
|
|
@@ -108,11 +108,11 @@ export function applyPriceDataToProducts(products, priceData) {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
// 3. 更新
|
|
112
|
-
if (updatedProduct.
|
|
111
|
+
// 3. 更新 bundle_group 价格
|
|
112
|
+
if (updatedProduct.bundle_group && updatedProduct.bundle_group.length > 0) {
|
|
113
113
|
var productBundleMap = bundleMap.get(product.id);
|
|
114
114
|
if (productBundleMap) {
|
|
115
|
-
updatedProduct.
|
|
115
|
+
updatedProduct.bundle_group = updatedProduct.bundle_group.map(function (bg) {
|
|
116
116
|
var groupItemMap = productBundleMap.get(bg.id); // O(1)
|
|
117
117
|
if (!groupItemMap) return bg;
|
|
118
118
|
return _objectSpread(_objectSpread({}, bg), {}, {
|
|
@@ -343,7 +343,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
343
343
|
};
|
|
344
344
|
setOtherData(key: string, value: any): void;
|
|
345
345
|
getOtherData(key: string): any;
|
|
346
|
-
getProductTypeById(id: number): Promise<"
|
|
346
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
347
347
|
/**
|
|
348
348
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
349
349
|
*
|
|
@@ -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(): "duration" | "session" | "normal";
|
|
53
53
|
}
|
|
@@ -162,6 +162,8 @@ export interface ProductData {
|
|
|
162
162
|
categories: ProductCategory[];
|
|
163
163
|
/** 套餐组 */
|
|
164
164
|
bundle_groups: ProductBundleGroup[];
|
|
165
|
+
/** 套餐组 */
|
|
166
|
+
bundle_group: ProductBundleGroup[];
|
|
165
167
|
/** 商品资源 */
|
|
166
168
|
product_resource?: {
|
|
167
169
|
resources?: ProductResourceItem[];
|
|
@@ -123,7 +123,7 @@ var MenuModule = class extends import_BaseModule.BaseModule {
|
|
|
123
123
|
*/
|
|
124
124
|
getMenuByIds(ids) {
|
|
125
125
|
if (!ids || ids.length === 0) {
|
|
126
|
-
this.
|
|
126
|
+
this.logInfo("getMenuByIds: 未提供有效的 ids", { idsCount: 0 });
|
|
127
127
|
return [];
|
|
128
128
|
}
|
|
129
129
|
const result = [];
|
|
@@ -179,7 +179,7 @@ var ScheduleModuleEx = class extends import_BaseModule.BaseModule {
|
|
|
179
179
|
*/
|
|
180
180
|
getScheduleByIds(ids) {
|
|
181
181
|
if (!ids || ids.length === 0) {
|
|
182
|
-
this.
|
|
182
|
+
this.logInfo("getScheduleByIds: 未提供有效的 ids", { idsCount: 0 });
|
|
183
183
|
return [];
|
|
184
184
|
}
|
|
185
185
|
const result = [];
|
|
@@ -94,10 +94,10 @@ function applyPriceDataToProducts(products, priceData) {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
if (updatedProduct.
|
|
97
|
+
if (updatedProduct.bundle_group && updatedProduct.bundle_group.length > 0) {
|
|
98
98
|
const productBundleMap = bundleMap.get(product.id);
|
|
99
99
|
if (productBundleMap) {
|
|
100
|
-
updatedProduct.
|
|
100
|
+
updatedProduct.bundle_group = updatedProduct.bundle_group.map(
|
|
101
101
|
(bg) => {
|
|
102
102
|
const groupItemMap = productBundleMap.get(bg.id);
|
|
103
103
|
if (!groupItemMap)
|
|
@@ -343,7 +343,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
343
343
|
};
|
|
344
344
|
setOtherData(key: string, value: any): void;
|
|
345
345
|
getOtherData(key: string): any;
|
|
346
|
-
getProductTypeById(id: number): Promise<"
|
|
346
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
347
347
|
/**
|
|
348
348
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
349
349
|
*
|