@pisell/pisellos 0.0.567 → 0.0.568

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.
Files changed (228) hide show
  1. package/dist/core/index.js +6 -9
  2. package/dist/model/strategy/adapter/walletPass/evaluator.js +0 -2
  3. package/dist/model/strategy/adapter/walletPass/example.js +3 -26
  4. package/dist/model/strategy/adapter/walletPass/utils.js +0 -3
  5. package/dist/model/strategy/strategy-example.js +5 -19
  6. package/dist/modules/Cart/index.js +0 -3
  7. package/dist/modules/Cart/utils/cartProduct.js +0 -1
  8. package/dist/modules/Date/index.js +1 -5
  9. package/dist/modules/Discount/index.js +1 -4
  10. package/dist/modules/OpenData/index.js +0 -2
  11. package/dist/modules/Order/index.d.ts +1 -1
  12. package/dist/modules/Order/index.js +14 -41
  13. package/dist/modules/Payment/index.js +142 -270
  14. package/dist/modules/Payment/walletpass.js +4 -5
  15. package/dist/modules/Rules/index.js +0 -7
  16. package/dist/modules/Schedule/utils.js +0 -1
  17. package/dist/modules/Step/index.js +0 -1
  18. package/dist/plugins/request.js +1 -4
  19. package/dist/plugins/window.js +2 -6
  20. package/dist/server/index.js +88 -121
  21. package/dist/server/modules/menu/index.js +32 -41
  22. package/dist/server/modules/products/index.js +29 -49
  23. package/dist/server/modules/quotation/index.js +29 -38
  24. package/dist/server/modules/resource/index.js +3 -4
  25. package/dist/server/modules/schedule/index.js +32 -40
  26. package/dist/server/utils/product.js +0 -1
  27. package/dist/solution/BookingByStep/index.d.ts +1 -1
  28. package/dist/solution/BookingByStep/index.js +7 -59
  29. package/dist/solution/BookingByStep/utils/capacity.js +1 -11
  30. package/dist/solution/BookingByStep/utils/resources.js +1 -3
  31. package/dist/solution/BookingByStep/utils/timeslots.js +2 -43
  32. package/dist/solution/BookingTicket/index.d.ts +1 -1
  33. package/dist/solution/BookingTicket/index.js +5 -7
  34. package/dist/solution/BookingTicket/utils/scan/handleScan.js +25 -31
  35. package/dist/solution/BookingTicket/utils/scan/index.js +6 -10
  36. package/dist/solution/BuyTickets/index.js +9 -12
  37. package/dist/solution/Checkout/index.js +177 -246
  38. package/dist/solution/Checkout/utils/index.js +4 -16
  39. package/dist/solution/RegisterAndLogin/index.js +30 -76
  40. package/dist/solution/ScanOrder/index.js +50 -60
  41. package/dist/solution/ShopDiscount/index.js +2 -7
  42. package/dist/solution/VenueBooking/index.d.ts +5 -0
  43. package/dist/solution/VenueBooking/index.js +364 -327
  44. package/dist/utils/task.js +15 -18
  45. package/dist/utils/watch.js +0 -1
  46. package/lib/apis/picoding.js +2 -0
  47. package/lib/core/index.js +130 -131
  48. package/lib/effects/index.js +46 -57
  49. package/lib/index.js +92 -53
  50. package/lib/model/index.js +14 -21
  51. package/lib/model/strategy/adapter/dataVariant/adapter.js +38 -50
  52. package/lib/model/strategy/adapter/dataVariant/evaluator.js +162 -236
  53. package/lib/model/strategy/adapter/dataVariant/examples.js +229 -237
  54. package/lib/model/strategy/adapter/dataVariant/index.js +39 -34
  55. package/lib/model/strategy/adapter/dataVariant/type.js +57 -28
  56. package/lib/model/strategy/adapter/index.js +100 -64
  57. package/lib/model/strategy/adapter/itemRule/adapter.js +156 -144
  58. package/lib/model/strategy/adapter/itemRule/evaluator.js +36 -48
  59. package/lib/model/strategy/adapter/itemRule/examples.js +295 -225
  60. package/lib/model/strategy/adapter/itemRule/index.js +83 -57
  61. package/lib/model/strategy/adapter/itemRule/type.js +97 -36
  62. package/lib/model/strategy/adapter/promotion/adapter.js +84 -63
  63. package/lib/model/strategy/adapter/promotion/evaluator.js +381 -231
  64. package/lib/model/strategy/adapter/promotion/examples.js +139 -159
  65. package/lib/model/strategy/adapter/promotion/index.js +1 -49
  66. package/lib/model/strategy/adapter/promotion/type.js +199 -35
  67. package/lib/model/strategy/adapter/type.js +4 -16
  68. package/lib/model/strategy/adapter/walletPass/evaluator.js +180 -152
  69. package/lib/model/strategy/adapter/walletPass/example.js +217 -190
  70. package/lib/model/strategy/adapter/walletPass/index.js +75 -51
  71. package/lib/model/strategy/adapter/walletPass/locales.js +36 -58
  72. package/lib/model/strategy/adapter/walletPass/type.js +4 -16
  73. package/lib/model/strategy/adapter/walletPass/utils.js +652 -402
  74. package/lib/model/strategy/engine.js +270 -168
  75. package/lib/model/strategy/index.js +49 -34
  76. package/lib/model/strategy/strategy-example.js +243 -239
  77. package/lib/model/strategy/type.js +100 -40
  78. package/lib/modules/Account/index.js +39 -53
  79. package/lib/modules/Account/types.js +20 -33
  80. package/lib/modules/AccountList/index.js +116 -154
  81. package/lib/modules/AccountList/types.js +30 -31
  82. package/lib/modules/AccountList/utils.js +18 -30
  83. package/lib/modules/BaseModule.js +22 -45
  84. package/lib/modules/Cart/index.js +170 -124
  85. package/lib/modules/Cart/types.js +46 -51
  86. package/lib/modules/Cart/utils/cartAccount.js +40 -39
  87. package/lib/modules/Cart/utils/cartDate.js +56 -61
  88. package/lib/modules/Cart/utils/cartDiscount.js +28 -33
  89. package/lib/modules/Cart/utils/cartNote.js +27 -32
  90. package/lib/modules/Cart/utils/cartProduct.js +306 -241
  91. package/lib/modules/Cart/utils/cartRelationForms.js +29 -35
  92. package/lib/modules/Cart/utils/cartResource.js +72 -78
  93. package/lib/modules/Cart/utils/changePrice.js +26 -62
  94. package/lib/modules/Cart/utils/index.js +106 -48
  95. package/lib/modules/Customer/constants.js +13 -34
  96. package/lib/modules/Customer/index.js +216 -153
  97. package/lib/modules/Customer/types.js +38 -35
  98. package/lib/modules/Date/index.js +116 -115
  99. package/lib/modules/Date/types.js +16 -28
  100. package/lib/modules/Date/utils.js +174 -123
  101. package/lib/modules/Discount/index.js +117 -113
  102. package/lib/modules/Discount/types.js +9 -31
  103. package/lib/modules/Guests/index.js +30 -56
  104. package/lib/modules/Guests/types.js +23 -33
  105. package/lib/modules/Holder/index.js +209 -189
  106. package/lib/modules/Holder/types.js +4 -16
  107. package/lib/modules/Holder/utils.js +20 -49
  108. package/lib/modules/OpenData/index.js +63 -74
  109. package/lib/modules/OpenData/types.js +4 -16
  110. package/lib/modules/OpenData/utils.js +44 -78
  111. package/lib/modules/Order/index.d.ts +1 -1
  112. package/lib/modules/Order/index.js +332 -320
  113. package/lib/modules/Order/types.js +24 -33
  114. package/lib/modules/Order/utils.js +350 -284
  115. package/lib/modules/Payment/cash.js +20 -33
  116. package/lib/modules/Payment/cashRecommendationAlgorithm.js +145 -76
  117. package/lib/modules/Payment/eftpos.js +16 -30
  118. package/lib/modules/Payment/index.js +566 -432
  119. package/lib/modules/Payment/mx51.js +1 -0
  120. package/lib/modules/Payment/types.js +216 -107
  121. package/lib/modules/Payment/utils.js +50 -47
  122. package/lib/modules/Payment/walletpass.js +221 -203
  123. package/lib/modules/Product/index.js +51 -46
  124. package/lib/modules/Product/types.js +4 -16
  125. package/lib/modules/Product/utils.js +32 -33
  126. package/lib/modules/ProductList/index.js +111 -110
  127. package/lib/modules/ProductList/types.js +9 -31
  128. package/lib/modules/Quotation/index.js +60 -82
  129. package/lib/modules/Quotation/types.js +4 -16
  130. package/lib/modules/Resource/index.js +27 -59
  131. package/lib/modules/Resource/types.js +22 -32
  132. package/lib/modules/Resource/utils.js +30 -38
  133. package/lib/modules/Rules/index.js +1172 -872
  134. package/lib/modules/Rules/types.js +17 -40
  135. package/lib/modules/SalesSummary/index.js +59 -68
  136. package/lib/modules/SalesSummary/types.js +4 -16
  137. package/lib/modules/SalesSummary/utils.js +176 -193
  138. package/lib/modules/ScanOrderLogger/index.js +59 -79
  139. package/lib/modules/ScanOrderLogger/providers/feishu.js +54 -78
  140. package/lib/modules/ScanOrderLogger/providers/grafana.js +13 -36
  141. package/lib/modules/ScanOrderLogger/types.js +4 -16
  142. package/lib/modules/Schedule/getDateIsInSchedule.js +334 -167
  143. package/lib/modules/Schedule/index.js +97 -107
  144. package/lib/modules/Schedule/type.js +4 -16
  145. package/lib/modules/Schedule/types.js +4 -16
  146. package/lib/modules/Schedule/utils.js +433 -291
  147. package/lib/modules/Step/index.js +40 -52
  148. package/lib/modules/Step/tyeps.js +4 -16
  149. package/lib/modules/Summary/index.js +66 -70
  150. package/lib/modules/Summary/types.js +4 -16
  151. package/lib/modules/Summary/utils.js +782 -429
  152. package/lib/modules/index.js +212 -57
  153. package/lib/plugins/app.js +4 -16
  154. package/lib/plugins/index.js +36 -25
  155. package/lib/plugins/request.js +137 -126
  156. package/lib/plugins/shopStore.js +4 -16
  157. package/lib/plugins/user.js +4 -16
  158. package/lib/plugins/window.js +171 -179
  159. package/lib/server/index.js +882 -623
  160. package/lib/server/modules/index.js +85 -59
  161. package/lib/server/modules/menu/index.js +146 -122
  162. package/lib/server/modules/menu/types.js +18 -31
  163. package/lib/server/modules/order/index.js +195 -231
  164. package/lib/server/modules/order/types.js +107 -32
  165. package/lib/server/modules/order/utils/filterBookings.js +174 -140
  166. package/lib/server/modules/order/utils/filterOrders.js +89 -60
  167. package/lib/server/modules/products/index.js +430 -335
  168. package/lib/server/modules/products/types.js +41 -34
  169. package/lib/server/modules/quotation/index.js +76 -77
  170. package/lib/server/modules/quotation/types.js +21 -31
  171. package/lib/server/modules/resource/index.js +216 -187
  172. package/lib/server/modules/resource/types.js +42 -33
  173. package/lib/server/modules/schedule/index.js +134 -119
  174. package/lib/server/modules/schedule/types.js +14 -21
  175. package/lib/server/modules/schedule/utils.js +334 -163
  176. package/lib/server/types.js +4 -16
  177. package/lib/server/utils/index.js +25 -23
  178. package/lib/server/utils/product.js +196 -139
  179. package/lib/server/utils/schedule.js +34 -41
  180. package/lib/server/utils/time.js +40 -49
  181. package/lib/solution/BookingByStep/index.d.ts +1 -1
  182. package/lib/solution/BookingByStep/index.js +1530 -1343
  183. package/lib/solution/BookingByStep/types.js +40 -99
  184. package/lib/solution/BookingByStep/utils/capacity.js +192 -160
  185. package/lib/solution/BookingByStep/utils/products.js +42 -52
  186. package/lib/solution/BookingByStep/utils/resources.js +527 -330
  187. package/lib/solution/BookingByStep/utils/stock.js +65 -44
  188. package/lib/solution/BookingByStep/utils/timeslots.js +129 -131
  189. package/lib/solution/BookingTicket/index.d.ts +1 -1
  190. package/lib/solution/BookingTicket/index.js +147 -122
  191. package/lib/solution/BookingTicket/types.js +38 -64
  192. package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +64 -80
  193. package/lib/solution/BookingTicket/utils/scan/handleScan.js +82 -80
  194. package/lib/solution/BookingTicket/utils/scan/index.js +90 -94
  195. package/lib/solution/BookingTicket/utils/scan/scanCache.js +90 -43
  196. package/lib/solution/BuyTickets/index.js +67 -70
  197. package/lib/solution/BuyTickets/types.js +22 -38
  198. package/lib/solution/Checkout/index.js +1451 -1158
  199. package/lib/solution/Checkout/types.js +91 -61
  200. package/lib/solution/Checkout/utils/index.js +227 -158
  201. package/lib/solution/PlaceOrder/index.js +55 -0
  202. package/lib/solution/RegisterAndLogin/config.js +493 -460
  203. package/lib/solution/RegisterAndLogin/index.js +633 -630
  204. package/lib/solution/RegisterAndLogin/types.js +189 -76
  205. package/lib/solution/RegisterAndLogin/utils.js +183 -125
  206. package/lib/solution/Sales/index.js +218 -200
  207. package/lib/solution/Sales/types.js +27 -33
  208. package/lib/solution/ScanOrder/index.js +803 -840
  209. package/lib/solution/ScanOrder/types.js +34 -34
  210. package/lib/solution/ScanOrder/utils.js +372 -331
  211. package/lib/solution/ShopDiscount/index.js +230 -236
  212. package/lib/solution/ShopDiscount/types.js +15 -37
  213. package/lib/solution/ShopDiscount/utils.js +309 -172
  214. package/lib/solution/VenueBooking/index.d.ts +5 -0
  215. package/lib/solution/VenueBooking/index.js +886 -929
  216. package/lib/solution/VenueBooking/types.js +20 -40
  217. package/lib/solution/VenueBooking/utils/dateSummary.js +22 -54
  218. package/lib/solution/VenueBooking/utils/resource.js +31 -54
  219. package/lib/solution/VenueBooking/utils/slotMerge.js +88 -106
  220. package/lib/solution/VenueBooking/utils/smartPricing.js +112 -100
  221. package/lib/solution/VenueBooking/utils/timeSlot.js +133 -132
  222. package/lib/solution/VenueBooking/utils.js +130 -67
  223. package/lib/solution/index.js +102 -37
  224. package/lib/store/createStore.js +32 -29
  225. package/lib/types/index.js +4 -16
  226. package/lib/utils/task.js +36 -36
  227. package/lib/utils/watch.js +81 -47
  228. package/package.json +2 -1
@@ -1,71 +1,39 @@
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);
1
+ "use strict";
28
2
 
29
- // src/modules/Cart/utils/cartProduct.ts
30
- var cartProduct_exports = {};
31
- __export(cartProduct_exports, {
32
- formatBundle: () => formatBundle,
33
- formatBundleToOrigin: () => formatBundleToOrigin,
34
- formatOptions: () => formatOptions,
35
- formatOptionsToOrigin: () => formatOptionsToOrigin,
36
- formatProductToCartItem: () => formatProductToCartItem,
37
- formatProductToCartItemOrigin: () => formatProductToCartItemOrigin,
38
- getProductDeposit: () => getProductDeposit,
39
- getProductOriginTotalPrice: () => getProductOriginTotalPrice,
40
- getProductTotalPrice: () => getProductTotalPrice,
41
- handleProductDeposit: () => handleProductDeposit,
42
- handleVariantProduct: () => handleVariantProduct
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
43
5
  });
44
- module.exports = __toCommonJS(cartProduct_exports);
45
- var import_decimal = __toESM(require("decimal.js"));
46
- var import_utils = require("../../Product/utils");
47
- var import_utils2 = require("../../../solution/ShopDiscount/utils");
48
- var import_utils3 = require("../../Summary/utils");
49
- var toDiscountPayload = (discountItem) => {
50
- var _a, _b;
51
- return {
52
- amount: discountItem.amount,
53
- tag: discountItem.type,
54
- par_value: (_a = discountItem.discount) == null ? void 0 : _a.percent,
55
- config: discountItem.config,
56
- metadata: {
57
- discount_card_type: (_b = discountItem == null ? void 0 : discountItem.discount) == null ? void 0 : _b.discount_card_type
58
- }
59
- };
60
- };
61
- var handleVariantProduct = (product) => {
62
- var _a;
63
- if (product == null ? void 0 : product.product_variant_id) {
64
- const targetVariant = (_a = product == null ? void 0 : product.variant) == null ? void 0 : _a.find(
65
- (n) => n.id === product.product_variant_id
66
- );
6
+ exports.handleVariantProduct = exports.handleProductDeposit = exports.getProductTotalPrice = exports.getProductOriginTotalPrice = exports.getProductDeposit = exports.formatProductToCartItemOrigin = exports.formatProductToCartItem = exports.formatOptionsToOrigin = exports.formatOptions = exports.formatBundleToOrigin = exports.formatBundle = void 0;
7
+ var _decimal = _interopRequireDefault(require("decimal.js"));
8
+ var _utils = require("../../Product/utils");
9
+ var _utils2 = require("../../../solution/ShopDiscount/utils");
10
+ var _utils3 = require("../../Summary/utils");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ /** 与 Rules / ShopDiscount 一致的折扣入参,用于主价与 option 单价 */
13
+ const toDiscountPayload = discountItem => ({
14
+ amount: discountItem.amount,
15
+ tag: discountItem.type,
16
+ par_value: discountItem.discount?.percent,
17
+ config: discountItem.config,
18
+ metadata: {
19
+ discount_card_type: discountItem?.discount?.discount_card_type
20
+ }
21
+ });
22
+
23
+ /**
24
+ * @title 处理组合商品
25
+ * @description 组合商品需要直接修改 product 里的价格和 is_charge_tax
26
+ * @param product 商品
27
+ * @returns 处理后的商品
28
+ */
29
+ const handleVariantProduct = product => {
30
+ // 判断组合商品,然后直接修改 product 里的价格和 is_charge_tax
31
+ if (product?.product_variant_id) {
32
+ // 还需要判断 能从 variant 里找到对应的组合规格信息,才可以替换
33
+ const targetVariant = product?.variant?.find(n => n.id === product.product_variant_id);
67
34
  if (targetVariant) {
68
35
  product.price = targetVariant.price;
36
+ // 如果 original_price 为 0,就不改了
69
37
  if (Number(targetVariant.original_price) > 0) {
70
38
  product.original_price = targetVariant.original_price;
71
39
  }
@@ -74,9 +42,14 @@ var handleVariantProduct = (product) => {
74
42
  }
75
43
  return product;
76
44
  };
77
- var formatProductToCartItem = (params) => {
78
- var _a, _b, _c;
79
- console.log("formatProductToCartItem>>>>>>", params);
45
+
46
+ /**
47
+ * 格式化商品到购物车
48
+ * @param product 商品
49
+ * @returns 格式化后的商品
50
+ */
51
+ exports.handleVariantProduct = handleVariantProduct;
52
+ const formatProductToCartItem = params => {
80
53
  const {
81
54
  cartItem,
82
55
  product,
@@ -86,14 +59,25 @@ var formatProductToCartItem = (params) => {
86
59
  quantity = 1,
87
60
  discounts
88
61
  } = params;
89
- const num = quantity;
62
+ const num = quantity; // 当前按照单个商品加入购物车
63
+
90
64
  if (product) {
91
- cartItem.id = product == null ? void 0 : product.id;
92
- cartItem.name = product == null ? void 0 : product.title;
93
- cartItem.price = product == null ? void 0 : product.price;
65
+ cartItem.id = product?.id;
66
+ cartItem.name = product?.title;
67
+ cartItem.price = product?.price;
94
68
  cartItem.num = num;
95
- cartItem.total = getProductTotalPrice({ product, bundle, options, num, discounts });
96
- cartItem.totalDifference = getTotalDifference({ product, bundle, discounts });
69
+ cartItem.total = getProductTotalPrice({
70
+ product,
71
+ bundle,
72
+ options,
73
+ num,
74
+ discounts
75
+ });
76
+ cartItem.totalDifference = getTotalDifference({
77
+ product,
78
+ bundle,
79
+ discounts
80
+ });
97
81
  cartItem.summaryTotal = cartItem.total * (num || 1);
98
82
  cartItem.origin_total = getProductOriginTotalPrice({
99
83
  product,
@@ -102,6 +86,7 @@ var formatProductToCartItem = (params) => {
102
86
  num,
103
87
  discounts
104
88
  });
89
+ // 不包含折扣卡商品券的总价
105
90
  const origin_total = getProductTotalPrice({
106
91
  product: cartItem._productInit || cartItem._productOrigin,
107
92
  bundle,
@@ -110,44 +95,38 @@ var formatProductToCartItem = (params) => {
110
95
  discounts: []
111
96
  });
112
97
  cartItem.summaryOriginTotal = (origin_total || 0) * (num || 1);
113
- cartItem.image = product == null ? void 0 : product.cover;
114
- cartItem.like_status = "common";
115
- cartItem.duration = product == null ? void 0 : product.duration;
116
- cartItem.isNormalProduct = (0, import_utils.isNormalProduct)(product);
117
- cartItem.is_charge_tax = product == null ? void 0 : product.is_charge_tax;
98
+ cartItem.image = product?.cover;
99
+ cartItem.like_status = 'common';
100
+ cartItem.duration = product?.duration;
101
+ cartItem.isNormalProduct = (0, _utils.isNormalProduct)(product);
102
+ cartItem.is_charge_tax = product?.is_charge_tax;
118
103
  }
119
- if (bundle == null ? void 0 : bundle.length) {
104
+ if (bundle?.length) {
120
105
  cartItem.bundle = formatBundle(bundle);
121
106
  }
122
- if (options == null ? void 0 : options.length) {
107
+ if (options?.length) {
123
108
  cartItem.options = formatOptions(options);
124
109
  }
110
+ // 拼装出 product_option_string
125
111
  if (product_variant_id) {
126
- const sku_key = (_b = (_a = product == null ? void 0 : product.variant) == null ? void 0 : _a.find(
127
- (n) => n.id === product_variant_id
128
- )) == null ? void 0 : _b.sku_key;
112
+ const sku_key = product?.variant?.find(n => n.id === product_variant_id)?.sku_key;
129
113
  if (sku_key) {
130
- const sku_key_arr = sku_key.split("_");
114
+ const sku_key_arr = sku_key.split('_');
131
115
  const product_option_string = [];
132
- sku_key_arr.forEach((item) => {
133
- var _a2, _b2;
134
- const keyMap = item.split(":");
135
- const targetVariantGroup = (_a2 = product == null ? void 0 : product.variant_group) == null ? void 0 : _a2.find(
136
- (n) => String(n.position_id) === keyMap[0]
137
- );
138
- const targetVariantItem = (_b2 = targetVariantGroup == null ? void 0 : targetVariantGroup.variant_item) == null ? void 0 : _b2.find(
139
- (n) => String(n.position_id) === keyMap[1]
140
- );
116
+ sku_key_arr.forEach(item => {
117
+ const keyMap = item.split(':');
118
+ const targetVariantGroup = product?.variant_group?.find(n => String(n.position_id) === keyMap[0]);
119
+ const targetVariantItem = targetVariantGroup?.variant_item?.find(n => String(n.position_id) === keyMap[1]);
141
120
  if (targetVariantGroup && targetVariantItem) {
142
- product_option_string.push(
143
- `${targetVariantGroup.name}:${targetVariantItem.name}`
144
- );
121
+ product_option_string.push(`${targetVariantGroup.name}:${targetVariantItem.name}`);
145
122
  }
146
123
  });
147
- cartItem.product_option_string = product_option_string.join(", ");
124
+ cartItem.product_option_string = product_option_string.join(', ');
148
125
  }
149
126
  }
150
- if (((_c = product == null ? void 0 : product.custom_deposit_data) == null ? void 0 : _c.has_deposit) == 1) {
127
+
128
+ // 如果商品有定金规则,则计算定金
129
+ if (product?.custom_deposit_data?.has_deposit == 1) {
151
130
  cartItem.deposit = getProductDeposit({
152
131
  cartItem,
153
132
  product,
@@ -160,8 +139,8 @@ var formatProductToCartItem = (params) => {
160
139
  cartItem._origin = oringin;
161
140
  return cartItem;
162
141
  };
163
- var formatProductToCartItemOrigin = (params) => {
164
- var _a, _b, _c, _d, _e;
142
+ exports.formatProductToCartItem = formatProductToCartItem;
143
+ const formatProductToCartItemOrigin = params => {
165
144
  const {
166
145
  cartItem,
167
146
  product,
@@ -171,122 +150,161 @@ var formatProductToCartItemOrigin = (params) => {
171
150
  quantity = 1
172
151
  } = params;
173
152
  let origin = cartItem._origin;
174
- const product_discount_difference = (((_a = origin.product) == null ? void 0 : _a.discount_list) || []).filter((item) => {
175
- var _a2;
176
- return !((_a2 = item == null ? void 0 : item.metadata) == null ? void 0 : _a2.custom_product_bundle_map_id);
177
- }).reduce((pre, cur) => {
178
- var _a2;
179
- return pre + (((_a2 = cur == null ? void 0 : cur.metadata) == null ? void 0 : _a2.product_discount_difference) || 0);
153
+ const product_discount_difference = (origin.product?.discount_list || []).filter(item => !item?.metadata?.custom_product_bundle_map_id).reduce((pre, cur) => {
154
+ return pre + (cur?.metadata?.product_discount_difference || 0);
180
155
  }, 0);
181
156
  if (product) {
182
157
  origin.product = {
183
- ...origin.product || {},
158
+ ...(origin.product || {}),
184
159
  num: quantity,
185
160
  product_id: product.id,
186
161
  product_variant_id: product_variant_id || 0,
187
- product_bundle: ((_b = origin.product) == null ? void 0 : _b.product_bundle) || [],
188
- product_option_item: ((_c = origin.product) == null ? void 0 : _c.product_option_item) || [],
162
+ product_bundle: origin.product?.product_bundle || [],
163
+ product_option_item: origin.product?.product_option_item || [],
189
164
  metadata: {
190
165
  product_discount_difference
191
166
  }
192
167
  };
193
- origin.sub_type = (_d = product == null ? void 0 : product.duration) == null ? void 0 : _d.type;
194
- origin.duration = (_e = product == null ? void 0 : product.duration) == null ? void 0 : _e.value;
195
- if (bundle == null ? void 0 : bundle.length) {
168
+ // 时长类型
169
+ origin.sub_type = product?.duration?.type;
170
+ // 时长
171
+ origin.duration = product?.duration?.value;
172
+ if (bundle?.length) {
196
173
  origin.product.product_bundle = formatBundleToOrigin(bundle);
197
174
  }
198
- if (options == null ? void 0 : options.length) {
175
+ if (options?.length) {
199
176
  origin.product.product_option_item = formatOptionsToOrigin(options);
200
177
  }
201
178
  }
202
179
  return origin;
203
180
  };
204
- var getProductTotalPrice = (params) => {
205
- const { product, bundle, options, discounts } = params;
181
+
182
+ /**
183
+ * 获取商品总价
184
+ * @description 当前总价计算基于商品数量为1
185
+ * @param item 商品
186
+ * @returns 商品总价
187
+ */
188
+ exports.formatProductToCartItemOrigin = formatProductToCartItemOrigin;
189
+ const getProductTotalPrice = params => {
190
+ const {
191
+ product,
192
+ bundle,
193
+ options,
194
+ discounts
195
+ } = params;
196
+ // const num = params.num || 1;
206
197
  let price = Number(product.price);
207
- const optionRows = (options == null ? void 0 : options.map((currentValue) => ({
198
+
199
+ // option 行:unit 折后价在循环中与主商品使用同一套 getDiscountAmount(含 deductOptionPrice)
200
+ const optionRows = options?.map(currentValue => ({
208
201
  unit: Number(currentValue.price ?? currentValue.add_price ?? 0),
209
202
  num: Number(currentValue.num ?? currentValue.quantity ?? 1)
210
- }))) ?? [];
211
- if (discounts == null ? void 0 : discounts.length) {
212
- discounts.forEach((currentValue) => {
213
- var _a;
203
+ })) ?? [];
204
+
205
+ // 如果商品有折扣,则计算折扣
206
+ if (discounts?.length) {
207
+ discounts.forEach(currentValue => {
214
208
  const payload = toDiscountPayload(currentValue);
215
- price = (0, import_utils2.getDiscountAmount)(payload, price, price);
216
- if (((_a = currentValue == null ? void 0 : currentValue.config) == null ? void 0 : _a.deductOptionPrice) && optionRows.length) {
209
+ price = (0, _utils2.getDiscountAmount)(payload, price, price);
210
+ if (currentValue?.config?.deductOptionPrice && optionRows.length) {
217
211
  for (let i = 0; i < optionRows.length; i++) {
218
212
  const row = optionRows[i];
219
213
  optionRows[i] = {
220
214
  ...row,
221
- unit: (0, import_utils2.getDiscountAmount)(payload, row.unit, row.unit)
215
+ unit: (0, _utils2.getDiscountAmount)(payload, row.unit, row.unit)
222
216
  };
223
217
  }
224
218
  }
225
219
  });
226
220
  }
227
- if (bundle == null ? void 0 : bundle.length) {
221
+ if (bundle?.length) {
228
222
  price = bundle.reduce((accumulator, currentValue) => {
229
223
  return accumulator + Number(currentValue.price) * Number(currentValue.num);
230
224
  }, price);
231
225
  }
226
+
227
+ // 单规格 / 加购 option
232
228
  if (optionRows.length) {
233
- price = optionRows.reduce(
234
- (accumulator, row) => accumulator + row.unit * row.num,
235
- price
236
- );
229
+ price = optionRows.reduce((accumulator, row) => accumulator + row.unit * row.num, price);
237
230
  }
238
231
  return Math.max(0, price);
239
232
  };
240
- var getTotalDifference = (params) => {
241
- const { bundle, discounts } = params;
233
+ exports.getProductTotalPrice = getProductTotalPrice;
234
+ const getTotalDifference = params => {
235
+ const {
236
+ bundle,
237
+ discounts
238
+ } = params;
242
239
  const bundleDiscountList = [];
243
- if (bundle == null ? void 0 : bundle.length) {
244
- bundle.forEach((currentValue) => {
245
- bundleDiscountList.push(...(currentValue == null ? void 0 : currentValue.discount_list) || []);
240
+ if (bundle?.length) {
241
+ bundle.forEach(currentValue => {
242
+ bundleDiscountList.push(...(currentValue?.discount_list || []));
246
243
  });
247
244
  }
248
- const allDiscounts = [...discounts || [], ...bundleDiscountList];
249
- const productDiscountProductDiscountDifference = (0, import_utils3.calcDiscountListDifference)(allDiscounts);
245
+ const allDiscounts = [...(discounts || []), ...bundleDiscountList];
246
+ const productDiscountProductDiscountDifference = (0, _utils3.calcDiscountListDifference)(allDiscounts);
250
247
  return productDiscountProductDiscountDifference || 0;
251
248
  };
252
- var getProductOriginTotalPrice = (params) => {
253
- const { product, bundle, options, discounts } = params;
254
- const num = (params == null ? void 0 : params.num) || 1;
249
+
250
+ /**
251
+ * 获取商品原始总价
252
+ * @description 当前总价计算基于商品数量为1
253
+ * @param item 商品
254
+ * @returns 商品原始总价
255
+ */
256
+ const getProductOriginTotalPrice = params => {
257
+ const {
258
+ product,
259
+ bundle,
260
+ options,
261
+ discounts
262
+ } = params;
263
+ const num = params?.num || 1;
255
264
  let price = Number(product.original_price);
256
- if ((isNaN(price) || price === 0) && !(discounts == null ? void 0 : discounts.length)) {
257
- return void 0;
265
+ if ((isNaN(price) || price === 0) && !discounts?.length) {
266
+ return undefined;
258
267
  }
259
- if (bundle == null ? void 0 : bundle.length) {
268
+ if (bundle?.length) {
260
269
  price = bundle.reduce((accumulator, currentValue) => {
261
270
  return accumulator + Number(currentValue.price) * Number(currentValue.num);
262
271
  }, price);
263
272
  }
264
- if (options == null ? void 0 : options.length) {
273
+
274
+ // 单规格
275
+ if (options?.length) {
265
276
  price = options.reduce((accumulator, currentValue) => {
266
277
  return accumulator + Number(currentValue.price) * Number(currentValue.num);
267
278
  }, price);
268
279
  }
269
280
  return price;
270
281
  };
271
- var formatOptions = (options) => {
272
- if (!(options == null ? void 0 : options.length))
273
- return [];
274
- return options.map((item) => {
282
+
283
+ /**
284
+ * 格式化套餐规格信息
285
+ * @param options 套餐规格信息
286
+ * @returns 格式化后的套餐规格信息
287
+ */
288
+ exports.getProductOriginTotalPrice = getProductOriginTotalPrice;
289
+ const formatOptions = options => {
290
+ if (!options?.length) return [];
291
+ return options.map(item => {
275
292
  return {
276
- id: item == null ? void 0 : item.id,
277
- name: item == null ? void 0 : item.name,
278
- num: item == null ? void 0 : item.num,
279
- price: item == null ? void 0 : item.price,
280
- total: item == null ? void 0 : item.price,
281
- origin_total: item == null ? void 0 : item.original_price
293
+ id: item?.id,
294
+ name: item?.name,
295
+ num: item?.num,
296
+ price: item?.price,
297
+ total: item?.price,
298
+ origin_total: item?.original_price
282
299
  };
283
300
  });
284
301
  };
285
- var formatOptionsToOrigin = (options) => {
286
- if (!(options == null ? void 0 : options.length)) {
302
+ exports.formatOptions = formatOptions;
303
+ const formatOptionsToOrigin = options => {
304
+ if (!options?.length) {
287
305
  return [];
288
306
  }
289
- return options.map((d) => {
307
+ return options.map(d => {
290
308
  return {
291
309
  num: d.num,
292
310
  option_group_item_id: d.product_option_item_id,
@@ -294,53 +312,57 @@ var formatOptionsToOrigin = (options) => {
294
312
  };
295
313
  });
296
314
  };
297
- var formatBundle = (bundle) => {
298
- if (!(bundle == null ? void 0 : bundle.length))
299
- return [];
300
- return bundle.map((item) => {
315
+
316
+ /**
317
+ * 格式化商品套餐信息
318
+ * @param bundle 商品套餐信息
319
+ * @returns 格式化后的商品套餐信息
320
+ */
321
+ exports.formatOptionsToOrigin = formatOptionsToOrigin;
322
+ const formatBundle = bundle => {
323
+ if (!bundle?.length) return [];
324
+ return bundle.map(item => {
301
325
  return {
302
- id: item == null ? void 0 : item.id,
303
- title: item == null ? void 0 : item.title,
304
- num: item == null ? void 0 : item.num,
305
- price: item == null ? void 0 : item.price,
306
- total: item == null ? void 0 : item.price,
307
- price_type: item == null ? void 0 : item.price_type,
308
- original_price: item == null ? void 0 : item.original_price,
309
- original_total: item == null ? void 0 : item.original_total,
310
- price_type_ext: item == null ? void 0 : item.price_type_ext,
311
- bundle_sum_price: item == null ? void 0 : item.bundle_sum_price,
312
- bundle_sum_type: item == null ? void 0 : item.bundle_sum_type,
313
- options: formatOptions(item == null ? void 0 : item.option),
326
+ id: item?.id,
327
+ title: item?.title,
328
+ num: item?.num,
329
+ price: item?.price,
330
+ total: item?.price,
331
+ price_type: item?.price_type,
332
+ original_price: item?.original_price,
333
+ original_total: item?.original_total,
334
+ price_type_ext: item?.price_type_ext,
335
+ bundle_sum_price: item?.bundle_sum_price,
336
+ bundle_sum_type: item?.bundle_sum_type,
337
+ options: formatOptions(item?.option),
314
338
  _bundle_product_id: item._bundle_product_id,
315
339
  discount_list: item.discount_list,
316
340
  originBundleItem: item.originBundleItem || item,
317
- is_charge_tax: item == null ? void 0 : item.is_charge_tax
341
+ is_charge_tax: item?.is_charge_tax
318
342
  };
319
343
  });
320
344
  };
321
- var formatBundleToOrigin = (bundle) => {
322
- if (!(bundle == null ? void 0 : bundle.length))
323
- return [];
324
- return bundle.map((d) => {
325
- const getBundleValueByKey = (key) => {
326
- var _a;
327
- return (d == null ? void 0 : d[key]) || ((_a = d == null ? void 0 : d.originBundleItem) == null ? void 0 : _a[key]);
345
+ exports.formatBundle = formatBundle;
346
+ const formatBundleToOrigin = bundle => {
347
+ if (!bundle?.length) return [];
348
+ return bundle.map(d => {
349
+ const getBundleValueByKey = key => {
350
+ return d?.[key] || d?.originBundleItem?.[key];
328
351
  };
329
- const product_discount_difference = ((d == null ? void 0 : d.discount_list) || []).reduce((pre, cur) => {
330
- var _a;
331
- return pre + (((_a = cur == null ? void 0 : cur.metadata) == null ? void 0 : _a.product_discount_difference) || 0);
352
+ const product_discount_difference = (d?.discount_list || []).reduce((pre, cur) => {
353
+ return pre + (cur?.metadata?.product_discount_difference || 0);
332
354
  }, 0);
333
355
  return {
334
- bundle_group_id: getBundleValueByKey("group_id"),
356
+ bundle_group_id: getBundleValueByKey('group_id'),
335
357
  bundle_id: d.id,
336
- bundle_product_id: getBundleValueByKey("_bundle_product_id") || getBundleValueByKey("product_id"),
337
- bundle_variant_id: getBundleValueByKey("bundle_variant_id"),
358
+ bundle_product_id: getBundleValueByKey('_bundle_product_id') || getBundleValueByKey('product_id'),
359
+ bundle_variant_id: getBundleValueByKey('bundle_variant_id'),
338
360
  num: d.num,
339
- extension_id: getBundleValueByKey("extension_id"),
340
- extension_type: getBundleValueByKey("extension_type"),
341
- option: formatOptionsToOrigin(getBundleValueByKey("option")),
361
+ extension_id: getBundleValueByKey('extension_id'),
362
+ extension_type: getBundleValueByKey('extension_type'),
363
+ option: formatOptionsToOrigin(getBundleValueByKey('option')),
342
364
  discount_list: d.discount_list,
343
- "bundle_selling_price": d == null ? void 0 : d.price,
365
+ "bundle_selling_price": d?.price,
344
366
  // "custom_price": d?.price,
345
367
  metadata: {
346
368
  custom_product_bundle_map_id: d._id,
@@ -349,103 +371,146 @@ var formatBundleToOrigin = (bundle) => {
349
371
  };
350
372
  });
351
373
  };
352
- var getProductDeposit = (params) => {
353
- var _a, _b;
354
- const { cartItem, product, bundle, options } = params;
355
- const num = (params == null ? void 0 : params.num) || 1;
356
- if (((_a = product == null ? void 0 : product.custom_deposit_data) == null ? void 0 : _a.has_deposit) == 1) {
357
- let total = new import_decimal.default(0);
374
+
375
+ /**
376
+ * 获取商品定金
377
+ * @description 定金基于商品售价来算,最终乘商品数量
378
+ * 1、如果套餐主商品有定金规则,则定金为:(套餐商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
379
+ * 2、如果套餐主商品没有定金规则,子商品有定金规则,则定金为:(套餐子商品售价 * 套餐子商品定金百分比 + 套餐子商品定金固定金额)* 商品数量,最终将所有子商品定金相加
380
+ * 3、普通商品/单规格商品/组合规则商品,定金规则:(商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
381
+ * @param params 参数
382
+ * @returns 商品定金
383
+ */
384
+ exports.formatBundleToOrigin = formatBundleToOrigin;
385
+ const getProductDeposit = params => {
386
+ const {
387
+ cartItem,
388
+ product,
389
+ bundle,
390
+ options
391
+ } = params;
392
+ const num = params?.num || 1;
393
+
394
+ // 判定商品是否有定金规则
395
+ if (product?.custom_deposit_data?.has_deposit == 1) {
396
+ let total = new _decimal.default(0);
358
397
  const {
359
398
  deposit_fixed,
360
399
  deposit_percentage,
361
400
  deposit_policy_data,
362
401
  self_deposit_policy_ids
363
- } = (product == null ? void 0 : product.custom_deposit_data) || {};
402
+ } = product?.custom_deposit_data || {};
403
+ // 所有协议数据
364
404
  const allProtocols = deposit_policy_data || [];
405
+ // 是否存在定金,主商品has_deposit为1,但是自身没有定金设置,需要判定子商品是否存在定金,如果不存在最终判定也是不存在定金
365
406
  let productHasDeposit = false;
407
+ // 关联的定金协议id
366
408
  const protocolIds = [];
367
- if (typeof deposit_fixed === "string" && typeof deposit_percentage === "string") {
368
- const { depositTotal, result } = handleProductDeposit({
369
- depositData: product == null ? void 0 : product.custom_deposit_data,
409
+
410
+ // 判断主商品是否有定金规则
411
+ if (typeof deposit_fixed === 'string' && typeof deposit_percentage === 'string') {
412
+ const {
413
+ depositTotal,
414
+ result
415
+ } = handleProductDeposit({
416
+ depositData: product?.custom_deposit_data,
370
417
  total: cartItem.total || 0,
371
418
  num
372
419
  });
373
420
  if (result) {
374
421
  total = depositTotal;
375
- protocolIds.push(...self_deposit_policy_ids || []);
422
+ protocolIds.push(...(self_deposit_policy_ids || []));
376
423
  productHasDeposit = true;
377
424
  }
378
425
  } else {
379
- if (product == null ? void 0 : product.product_variant_id) {
380
- const variantProduct = (_b = product == null ? void 0 : product.variant) == null ? void 0 : _b.find(
381
- (item) => (item == null ? void 0 : item.id) === (product == null ? void 0 : product.product_variant_id)
382
- );
426
+ // 组合规格商品
427
+ if (product?.product_variant_id) {
428
+ const variantProduct = product?.variant?.find(item => item?.id === product?.product_variant_id);
383
429
  if (variantProduct) {
384
- const depositData = variantProduct == null ? void 0 : variantProduct.custom_deposit_data;
385
- const { depositTotal, result } = handleProductDeposit({
430
+ const depositData = variantProduct?.custom_deposit_data;
431
+ const {
432
+ depositTotal,
433
+ result
434
+ } = handleProductDeposit({
386
435
  depositData,
387
- total: (cartItem == null ? void 0 : cartItem.total) || 0,
436
+ total: cartItem?.total || 0,
388
437
  num
389
438
  });
390
439
  if (result) {
391
440
  total = depositTotal;
392
- protocolIds.push(...(depositData == null ? void 0 : depositData.self_deposit_policy_ids) || []);
441
+ protocolIds.push(...(depositData?.self_deposit_policy_ids || []));
393
442
  productHasDeposit = true;
394
443
  }
395
444
  }
396
445
  }
397
- if (bundle == null ? void 0 : bundle.length) {
446
+ if (bundle?.length) {
398
447
  total = bundle.reduce((accumulator, currBundleProduct) => {
399
- const depositData = currBundleProduct == null ? void 0 : currBundleProduct.custom_deposit_data;
400
- const { depositTotal, result } = handleProductDeposit({
448
+ const depositData = currBundleProduct?.custom_deposit_data;
449
+ const {
450
+ depositTotal,
451
+ result
452
+ } = handleProductDeposit({
401
453
  depositData,
402
- total: currBundleProduct == null ? void 0 : currBundleProduct.price,
403
- num: (currBundleProduct == null ? void 0 : currBundleProduct.num) || 1
454
+ total: currBundleProduct?.price,
455
+ num: currBundleProduct?.num || 1
404
456
  });
405
457
  if (result) {
406
- protocolIds.push(...(depositData == null ? void 0 : depositData.self_deposit_policy_ids) || []);
458
+ protocolIds.push(...(depositData?.self_deposit_policy_ids || []));
407
459
  productHasDeposit = true;
408
460
  return accumulator.plus(depositTotal);
409
461
  }
410
462
  return accumulator;
411
- }, new import_decimal.default(0));
463
+ }, new _decimal.default(0));
412
464
  }
413
465
  }
414
466
  if (productHasDeposit) {
415
467
  const ids = new Set(protocolIds);
416
- const protocols = allProtocols.filter((item) => ids.has(item.id));
417
- return { total: total.toNumber(), protocols };
468
+ const protocols = allProtocols.filter(item => ids.has(item.id));
469
+ return {
470
+ total: total.toNumber(),
471
+ protocols
472
+ };
418
473
  }
419
474
  return null;
420
475
  }
421
476
  return null;
422
477
  };
423
- var handleProductDeposit = (params) => {
424
- const { depositData, total, num } = params;
478
+
479
+ /**
480
+ * 计算商品定金
481
+ * @param params 参数
482
+ * @returns 商品定金
483
+ */
484
+ exports.getProductDeposit = getProductDeposit;
485
+ const handleProductDeposit = params => {
486
+ const {
487
+ depositData,
488
+ total,
489
+ num
490
+ } = params;
425
491
  if (!depositData) {
426
- return { result: false, depositTotal: new import_decimal.default(0) };
492
+ return {
493
+ result: false,
494
+ depositTotal: new _decimal.default(0)
495
+ };
427
496
  }
428
- const { deposit_fixed, deposit_percentage } = depositData || {};
429
- if (typeof deposit_fixed === "string" && typeof deposit_percentage === "string") {
430
- const depositFixed = (0, import_decimal.default)(deposit_fixed || 0);
431
- const depositPercent = (0, import_decimal.default)(deposit_percentage || 0);
432
- const productTotalPrice = (0, import_decimal.default)(total || 0);
497
+ const {
498
+ deposit_fixed,
499
+ deposit_percentage
500
+ } = depositData || {};
501
+ if (typeof deposit_fixed === 'string' && typeof deposit_percentage === 'string') {
502
+ const depositFixed = (0, _decimal.default)(deposit_fixed || 0);
503
+ const depositPercent = (0, _decimal.default)(deposit_percentage || 0);
504
+ const productTotalPrice = (0, _decimal.default)(total || 0);
433
505
  const deposit = depositFixed.plus(depositPercent.times(productTotalPrice));
434
- return { depositTotal: deposit.times(num), result: true };
506
+ return {
507
+ depositTotal: deposit.times(num),
508
+ result: true
509
+ };
435
510
  }
436
- return { result: false, depositTotal: new import_decimal.default(0) };
511
+ return {
512
+ result: false,
513
+ depositTotal: new _decimal.default(0)
514
+ };
437
515
  };
438
- // Annotate the CommonJS export names for ESM import in node:
439
- 0 && (module.exports = {
440
- formatBundle,
441
- formatBundleToOrigin,
442
- formatOptions,
443
- formatOptionsToOrigin,
444
- formatProductToCartItem,
445
- formatProductToCartItemOrigin,
446
- getProductDeposit,
447
- getProductOriginTotalPrice,
448
- getProductTotalPrice,
449
- handleProductDeposit,
450
- handleVariantProduct
451
- });
516
+ exports.handleProductDeposit = handleProductDeposit;