@pisell/pisellos 2.3.43 → 2.3.45

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 (160) hide show
  1. package/dist/modules/Discount/index.d.ts +0 -1
  2. package/dist/modules/Discount/index.js +11 -40
  3. package/dist/modules/Discount/types.d.ts +0 -1
  4. package/dist/modules/OpenData/index.js +2 -2
  5. package/dist/modules/Order/index.d.ts +2 -3
  6. package/dist/modules/Order/index.js +98 -82
  7. package/dist/modules/Order/types.d.ts +2 -9
  8. package/dist/modules/Order/utils.d.ts +0 -10
  9. package/dist/modules/Order/utils.js +3 -35
  10. package/dist/modules/Payment/walletpass.d.ts +10 -3
  11. package/dist/modules/Payment/walletpass.js +425 -282
  12. package/dist/modules/Product/types.d.ts +0 -1
  13. package/dist/modules/ProductList/index.js +14 -33
  14. package/dist/modules/Quotation/index.d.ts +1 -1
  15. package/dist/modules/Quotation/index.js +2 -2
  16. package/dist/modules/Rules/index.d.ts +2 -0
  17. package/dist/modules/Rules/index.js +72 -102
  18. package/dist/modules/SalesSummary/index.js +13 -12
  19. package/dist/modules/ScanOrderLogger/index.d.ts +0 -2
  20. package/dist/modules/ScanOrderLogger/index.js +2 -15
  21. package/dist/modules/ScanOrderLogger/providers/feishu.js +27 -45
  22. package/dist/modules/ScanOrderLogger/types.d.ts +0 -1
  23. package/dist/modules/Schedule/index.d.ts +1 -3
  24. package/dist/modules/Schedule/index.js +16 -21
  25. package/dist/modules/Summary/utils.js +13 -38
  26. package/dist/modules/index.d.ts +0 -2
  27. package/dist/modules/index.js +1 -3
  28. package/dist/plugins/window.d.ts +0 -1
  29. package/dist/server/index.d.ts +0 -14
  30. package/dist/server/index.js +657 -772
  31. package/dist/solution/BaseSales/index.d.ts +0 -7
  32. package/dist/solution/BaseSales/index.js +48 -67
  33. package/dist/solution/BaseSales/types.d.ts +3 -1
  34. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +6 -3
  35. package/dist/solution/BookingByStep/index.d.ts +1 -16
  36. package/dist/solution/BookingByStep/index.js +215 -294
  37. package/dist/solution/BookingByStep/types.d.ts +1 -2
  38. package/dist/solution/BookingByStep/types.js +1 -3
  39. package/dist/solution/BookingByStep/utils/capacity.js +1 -17
  40. package/dist/solution/BookingByStep/utils/timeslots.d.ts +1 -3
  41. package/dist/solution/BookingByStep/utils/timeslots.js +12 -19
  42. package/dist/solution/BookingTicket/index.d.ts +1 -13
  43. package/dist/solution/BookingTicket/index.js +8 -5
  44. package/dist/solution/BookingTicket/types.d.ts +1 -0
  45. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +3 -3
  46. package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -3
  47. package/dist/solution/BookingTicket/utils/scan/handleScan.js +2 -10
  48. package/dist/solution/ScanOrder/index.d.ts +14 -26
  49. package/dist/solution/ScanOrder/index.js +739 -1142
  50. package/dist/solution/ScanOrder/types.d.ts +1 -21
  51. package/dist/solution/ScanOrder/utils.d.ts +0 -8
  52. package/dist/solution/ScanOrder/utils.js +25 -66
  53. package/dist/solution/ShopDiscount/index.d.ts +0 -1
  54. package/dist/solution/ShopDiscount/index.js +87 -125
  55. package/dist/solution/VenueBooking/index.d.ts +12 -39
  56. package/dist/solution/VenueBooking/index.js +841 -1167
  57. package/dist/solution/VenueBooking/types.d.ts +0 -3
  58. package/dist/solution/VenueBooking/utils/resource.js +0 -1
  59. package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
  60. package/dist/solution/VenueBooking/utils/slotMerge.js +5 -10
  61. package/dist/solution/index.d.ts +0 -1
  62. package/dist/solution/index.js +1 -2
  63. package/dist/types/index.d.ts +0 -1
  64. package/lib/model/strategy/adapter/promotion/index.js +51 -0
  65. package/lib/modules/Discount/index.d.ts +0 -1
  66. package/lib/modules/Discount/index.js +0 -9
  67. package/lib/modules/Discount/types.d.ts +0 -1
  68. package/lib/modules/OpenData/index.js +1 -1
  69. package/lib/modules/Order/index.d.ts +2 -3
  70. package/lib/modules/Order/index.js +56 -33
  71. package/lib/modules/Order/types.d.ts +2 -9
  72. package/lib/modules/Order/utils.d.ts +0 -10
  73. package/lib/modules/Order/utils.js +5 -36
  74. package/lib/modules/Payment/walletpass.d.ts +10 -3
  75. package/lib/modules/Payment/walletpass.js +218 -56
  76. package/lib/modules/Product/types.d.ts +0 -1
  77. package/lib/modules/ProductList/index.js +31 -40
  78. package/lib/modules/Quotation/index.d.ts +1 -1
  79. package/lib/modules/Quotation/index.js +2 -2
  80. package/lib/modules/Rules/index.d.ts +2 -0
  81. package/lib/modules/Rules/index.js +24 -36
  82. package/lib/modules/SalesSummary/index.js +7 -6
  83. package/lib/modules/ScanOrderLogger/index.d.ts +0 -2
  84. package/lib/modules/ScanOrderLogger/index.js +1 -13
  85. package/lib/modules/ScanOrderLogger/providers/feishu.js +6 -15
  86. package/lib/modules/ScanOrderLogger/types.d.ts +0 -1
  87. package/lib/modules/Schedule/index.d.ts +1 -3
  88. package/lib/modules/Schedule/index.js +8 -10
  89. package/lib/modules/Summary/utils.js +1 -21
  90. package/lib/modules/index.d.ts +0 -2
  91. package/lib/modules/index.js +1 -5
  92. package/lib/plugins/window.d.ts +0 -1
  93. package/lib/server/index.d.ts +0 -14
  94. package/lib/server/index.js +5 -65
  95. package/lib/solution/BaseSales/index.d.ts +0 -7
  96. package/lib/solution/BaseSales/index.js +9 -24
  97. package/lib/solution/BaseSales/types.d.ts +3 -1
  98. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +3 -2
  99. package/lib/solution/BookingByStep/index.d.ts +1 -16
  100. package/lib/solution/BookingByStep/index.js +18 -60
  101. package/lib/solution/BookingByStep/types.d.ts +1 -2
  102. package/lib/solution/BookingByStep/types.js +0 -5
  103. package/lib/solution/BookingByStep/utils/capacity.js +1 -20
  104. package/lib/solution/BookingByStep/utils/timeslots.d.ts +1 -3
  105. package/lib/solution/BookingByStep/utils/timeslots.js +11 -19
  106. package/lib/solution/BookingTicket/index.d.ts +1 -13
  107. package/lib/solution/BookingTicket/index.js +3 -10
  108. package/lib/solution/BookingTicket/types.d.ts +1 -0
  109. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +2 -2
  110. package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -3
  111. package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -2
  112. package/lib/solution/ScanOrder/index.d.ts +14 -26
  113. package/lib/solution/ScanOrder/index.js +182 -449
  114. package/lib/solution/ScanOrder/types.d.ts +1 -21
  115. package/lib/solution/ScanOrder/utils.d.ts +0 -8
  116. package/lib/solution/ScanOrder/utils.js +0 -31
  117. package/lib/solution/ShopDiscount/index.d.ts +0 -1
  118. package/lib/solution/ShopDiscount/index.js +0 -14
  119. package/lib/solution/VenueBooking/index.d.ts +12 -39
  120. package/lib/solution/VenueBooking/index.js +110 -322
  121. package/lib/solution/VenueBooking/types.d.ts +0 -3
  122. package/lib/solution/VenueBooking/utils/resource.js +0 -1
  123. package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
  124. package/lib/solution/VenueBooking/utils/slotMerge.js +4 -6
  125. package/lib/solution/index.d.ts +0 -1
  126. package/lib/solution/index.js +1 -3
  127. package/lib/types/index.d.ts +0 -1
  128. package/package.json +1 -1
  129. package/dist/modules/Holder/index.d.ts +0 -48
  130. package/dist/modules/Holder/index.js +0 -640
  131. package/dist/modules/Holder/types.d.ts +0 -123
  132. package/dist/modules/Holder/types.js +0 -1
  133. package/dist/modules/Holder/utils.d.ts +0 -13
  134. package/dist/modules/Holder/utils.js +0 -34
  135. package/dist/modules/ResourcePlanner/index.d.ts +0 -24
  136. package/dist/modules/ResourcePlanner/index.js +0 -181
  137. package/dist/modules/ResourcePlanner/planner.d.ts +0 -14
  138. package/dist/modules/ResourcePlanner/planner.js +0 -1069
  139. package/dist/modules/ResourcePlanner/types.d.ts +0 -227
  140. package/dist/modules/ResourcePlanner/types.js +0 -1
  141. package/dist/solution/UnifiedBookingSales/index.d.ts +0 -183
  142. package/dist/solution/UnifiedBookingSales/index.js +0 -1891
  143. package/dist/solution/UnifiedBookingSales/types.d.ts +0 -143
  144. package/dist/solution/UnifiedBookingSales/types.js +0 -11
  145. package/lib/modules/Holder/index.d.ts +0 -48
  146. package/lib/modules/Holder/index.js +0 -402
  147. package/lib/modules/Holder/types.d.ts +0 -123
  148. package/lib/modules/Holder/types.js +0 -17
  149. package/lib/modules/Holder/utils.d.ts +0 -13
  150. package/lib/modules/Holder/utils.js +0 -71
  151. package/lib/modules/ResourcePlanner/index.d.ts +0 -24
  152. package/lib/modules/ResourcePlanner/index.js +0 -148
  153. package/lib/modules/ResourcePlanner/planner.d.ts +0 -14
  154. package/lib/modules/ResourcePlanner/planner.js +0 -933
  155. package/lib/modules/ResourcePlanner/types.d.ts +0 -227
  156. package/lib/modules/ResourcePlanner/types.js +0 -17
  157. package/lib/solution/UnifiedBookingSales/index.d.ts +0 -183
  158. package/lib/solution/UnifiedBookingSales/index.js +0 -1084
  159. package/lib/solution/UnifiedBookingSales/types.d.ts +0 -143
  160. package/lib/solution/UnifiedBookingSales/types.js +0 -33
@@ -1,6 +1,5 @@
1
1
  import { OrderModule, ProductList, SalesSummaryModule, ScanOrderLogInput, ScanOrderLoggerModule, ScanOrderLoggerProviderConfig, ScanOrderLoggerProviderType, DateModule, ScheduleModule, QuotationModule, OpenDataModule } from '../../modules';
2
2
  import type { QuantityCheckResult, QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
3
- import { HolderModule } from '../../modules/Holder';
4
3
  export type { ScanOrderOrderProductIdentity, ScanOrderOrderProduct, ScanOrderSubmitProduct, ScanOrderSummary, ScanOrderTempOrder, ScanOrderSubmitPayload, } from '../ScanOrder/types';
5
4
  export declare enum VenueBookingHooks {
6
5
  onInited = "venueBooking:onInited",
@@ -97,7 +96,6 @@ export interface VenueResourceRawData {
97
96
  export interface ResourceProductMapping {
98
97
  productId: number;
99
98
  productTitle: string;
100
- formName?: string;
101
99
  resourceName: string;
102
100
  formId: number | string;
103
101
  price: string;
@@ -146,7 +144,6 @@ export interface VenueBookingState {
146
144
  passed: boolean | null;
147
145
  failures: QuantityCheckResult[];
148
146
  };
149
- holder?: HolderModule;
150
147
  }
151
148
  export interface VenueBookingLoggerRuntimeConfig {
152
149
  provider?: ScanOrderLoggerProviderType;
@@ -93,7 +93,6 @@ export function buildResourceProductMap(products) {
93
93
  var mapping = {
94
94
  productId: product.id,
95
95
  productTitle: product.title,
96
- formName: resource.title,
97
96
  resourceName: resource.title,
98
97
  formId: resource.id,
99
98
  price: product.price || '0.00',
@@ -12,6 +12,10 @@ export declare function buildPriceBreakdown(params: {
12
12
  }) => number;
13
13
  };
14
14
  }): PriceBreakdownEntry[];
15
+ export declare function buildVenueResourceMetadata(params: {
16
+ mapping: ResourceProductMapping;
17
+ rawResource: VenueResourceRawData | undefined;
18
+ }): Record<string, any>;
15
19
  export interface BuildVenueBookingParams {
16
20
  group: MergedSlotGroup;
17
21
  resourceId: number | string;
@@ -25,10 +29,6 @@ export interface BuildVenueBookingParams {
25
29
  */
26
30
  childResources?: VenueResourceRawData[];
27
31
  }
28
- export declare function buildVenueResourceMetadata(params: {
29
- mapping: ResourceProductMapping;
30
- rawResource: VenueResourceRawData | undefined;
31
- }): Record<string, any>;
32
32
  export declare function buildVenueBookingEntry(params: BuildVenueBookingParams): Record<string, any>;
33
33
  /**
34
34
  * 从一条已合并的订单商品还原出独立的时段列表。
@@ -90,15 +90,13 @@ export function buildPriceBreakdown(params) {
90
90
  return entries;
91
91
  }
92
92
  export function buildVenueResourceMetadata(params) {
93
- var _mapping$formName, _rawResource$main_fie;
93
+ var _rawResource$form_nam, _ref, _rawResource$main_fie, _rawResource$combined;
94
94
  var mapping = params.mapping,
95
95
  rawResource = params.rawResource;
96
- var combined = rawResource === null || rawResource === void 0 ? void 0 : rawResource.combined_resource;
97
- var isCombined = !!(combined && combined.status === 1 && Array.isArray(combined.resource_ids));
98
96
  return {
99
- form_name: (_mapping$formName = mapping.formName) !== null && _mapping$formName !== void 0 ? _mapping$formName : mapping.resourceName,
100
- resource_name: (_rawResource$main_fie = rawResource === null || rawResource === void 0 ? void 0 : rawResource.main_field) !== null && _rawResource$main_fie !== void 0 ? _rawResource$main_fie : mapping.resourceName,
101
- combined_resource: isCombined ? combined : null
97
+ form_name: (_rawResource$form_nam = rawResource === null || rawResource === void 0 ? void 0 : rawResource.form_name) !== null && _rawResource$form_nam !== void 0 ? _rawResource$form_nam : '',
98
+ resource_name: (_ref = (_rawResource$main_fie = rawResource === null || rawResource === void 0 ? void 0 : rawResource.main_field) !== null && _rawResource$main_fie !== void 0 ? _rawResource$main_fie : mapping.resourceName) !== null && _ref !== void 0 ? _ref : '',
99
+ combined_resource: (_rawResource$combined = rawResource === null || rawResource === void 0 ? void 0 : rawResource.combined_resource) !== null && _rawResource$combined !== void 0 ? _rawResource$combined : null
102
100
  };
103
101
  }
104
102
  export function buildVenueBookingEntry(params) {
@@ -121,10 +119,7 @@ export function buildVenueBookingEntry(params) {
121
119
  form_id: (_rawResource$form_id = rawResource === null || rawResource === void 0 ? void 0 : rawResource.form_id) !== null && _rawResource$form_id !== void 0 ? _rawResource$form_id : mapping.formId,
122
120
  relation_id: resourceId,
123
121
  capacity: 1,
124
- metadata: buildVenueResourceMetadata({
125
- mapping: mapping,
126
- rawResource: rawResource
127
- })
122
+ metadata: {}
128
123
  };
129
124
  if (childResources && childResources.length) {
130
125
  resourceEntry.children = childResources.map(function (child) {
@@ -8,4 +8,3 @@ export * from './Sales';
8
8
  export * from './ScanOrder';
9
9
  export * from './BaseSales';
10
10
  export * from './VenueBooking';
11
- export * from './UnifiedBookingSales';
@@ -7,5 +7,4 @@ export * from "./Checkout";
7
7
  export * from "./Sales";
8
8
  export * from "./ScanOrder";
9
9
  export * from "./BaseSales";
10
- export * from "./VenueBooking";
11
- export * from "./UnifiedBookingSales";
10
+ export * from "./VenueBooking";
@@ -6,7 +6,6 @@ export interface Plugin {
6
6
  version: string;
7
7
  initialize: () => Promise<void> | void;
8
8
  destroy?: () => Promise<void> | void;
9
- getLocalStorage?: (key: string) => string | null;
10
9
  }
11
10
  export interface PluginOptions {
12
11
  dependencies?: string[];
@@ -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
+ });
@@ -32,7 +32,6 @@ export declare class DiscountModule extends BaseModule implements Module, Discou
32
32
  customerId?: number;
33
33
  orderId?: number;
34
34
  }): Promise<DiscountWithReason>;
35
- batchSearchByProductIds(productIds: number[]): Promise<any>;
36
35
  filterEnabledDiscountList(discountList: Discount[]): Discount[];
37
36
  private checkUsageCreditsLimit;
38
37
  filterEnabledDiscountListWithReason(discountList: Discount[]): DiscountWithReason;
@@ -147,15 +147,6 @@ var DiscountModule = class extends import_BaseModule.BaseModule {
147
147
  const resultDiscountWithReason = this.filterEnabledDiscountListWithReason((result == null ? void 0 : result.data) || []) || [];
148
148
  return resultDiscountWithReason;
149
149
  }
150
- async batchSearchByProductIds(productIds) {
151
- const result = await this.request.get(`/machinecode/batch-search`, {
152
- ids: productIds,
153
- translate_flag: 1,
154
- tags: ["good_pass", "product_discount_card"],
155
- relation_product: 1
156
- });
157
- return (result == null ? void 0 : result.data) || [];
158
- }
159
150
  filterEnabledDiscountList(discountList) {
160
151
  return discountList.filter(
161
152
  (discount) => discount.limit_status === "enable" && new import_decimal.default((discount == null ? void 0 : discount.par_value) || 0).minus(new import_decimal.default((discount == null ? void 0 : discount.used_par_value) || 0)).greaterThan(0) && this.checkUsageCreditsLimit(discount)
@@ -157,7 +157,6 @@ export interface Discount {
157
157
  num?: number;
158
158
  start_date?: string;
159
159
  start_time?: string;
160
- discount_rule_uncheck_flag?: boolean;
161
160
  usageLimitFailKey?: string | null;
162
161
  unified_available_status?: number | undefined | null;
163
162
  }
@@ -73,7 +73,7 @@ var OpenDataModule = class extends import_BaseModule.BaseModule {
73
73
  }
74
74
  async fetchOpenData(params) {
75
75
  var _a, _b;
76
- const getData = (_b = (_a = this.appPlugin) == null ? void 0 : _a.getData) == null ? void 0 : _b.call(_a);
76
+ const getData = (_b = (_a = this.appPlugin).getData) == null ? void 0 : _b.call(_a);
77
77
  const shopId = getData == null ? void 0 : getData("shop_id");
78
78
  if (!shopId)
79
79
  throw new Error("[OpenDataModule] 无法获取 shop_id");
@@ -1,6 +1,6 @@
1
1
  import { Module, PisellCore, ModuleOptions } from '../../types';
2
2
  import { BaseModule } from '../BaseModule';
3
- import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, CancelOrderParams, ChangeBookingStatusParams, CheckoutOrderParams } from './types';
3
+ import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, CheckoutOrderParams, CancelOrderParams, ChangeBookingStatusParams } from './types';
4
4
  import { CartItem } from '../Cart/types';
5
5
  import { type SubmitPayloadEnhancer } from './utils';
6
6
  import type { OrderAmountSnapshot, AddProductBookingInput, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, ReplaceTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions } from './types';
@@ -81,6 +81,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
81
81
  private ensureEditDiscountConfigForProductChange;
82
82
  scanCode(code: string, customerId?: number): Promise<{
83
83
  isAvailable: boolean;
84
+ isAccepted?: boolean;
84
85
  discountList: Discount[];
85
86
  type: 'server' | 'clientCalc';
86
87
  unavailableReason?: UnavailableReason;
@@ -146,7 +147,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
146
147
  isTempOrderPersistEnabled(): boolean;
147
148
  /** @deprecated OrderModule 不再负责 tempOrder localStorage 持久化;草稿保存请使用 IndexedDB saveDraft。 */
148
149
  persistTempOrder(): void;
149
- notifyTempOrderChanged(): void;
150
150
  private createDefaultTempOrderInstance;
151
151
  private createExternalSaleNumber;
152
152
  private ensureExternalSaleNumber;
@@ -496,7 +496,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
496
496
  is_deposit: number;
497
497
  relation_products: any[];
498
498
  relation_forms: any[];
499
- business_code: string | undefined;
500
499
  };
501
500
  checkBeforeSubmitOrder(params: {
502
501
  cartItems: CartItem[];
@@ -70,6 +70,24 @@ function isManualProductDiscountProduct(product) {
70
70
  }
71
71
  var ORDER_PAYMENT_STATUS_PAID = "paid";
72
72
  var ORDER_PAYMENT_STATUS_PENDING = "payment_pending";
73
+ var CUSTOMER_PROMOTION_DISCOUNT_TAGS = /* @__PURE__ */ new Set([
74
+ "good_pass",
75
+ "product_discount_card",
76
+ "discount_card"
77
+ ]);
78
+ function isCustomerPromotionDiscount(discount) {
79
+ return CUSTOMER_PROMOTION_DISCOUNT_TAGS.has(
80
+ String((discount == null ? void 0 : discount.tag) || (discount == null ? void 0 : discount.type) || "").toLowerCase()
81
+ );
82
+ }
83
+ function markScannedDiscounts(discountList, scannedDiscountList) {
84
+ const scannedIds = new Set(
85
+ scannedDiscountList.map((discount) => discount == null ? void 0 : discount.id).filter((id) => id !== void 0 && id !== null).map(String)
86
+ );
87
+ return discountList.map(
88
+ (discount) => scannedIds.has(String(discount == null ? void 0 : discount.id)) ? { ...discount, isScan: true } : discount
89
+ );
90
+ }
73
91
  function isVoucherPaymentRecord(payment) {
74
92
  return (payment == null ? void 0 : payment.voucher_id) !== void 0 && Number(payment.voucher_id) !== 0;
75
93
  }
@@ -122,6 +140,7 @@ var OrderModule = class extends import_BaseModule.BaseModule {
122
140
  const type = (item == null ? void 0 : item.type) ?? (item == null ? void 0 : item.tag);
123
141
  if (!type || type === "product")
124
142
  continue;
143
+ const isDiscountCard = type === "discount_card" || type === "product_discount_card";
125
144
  const resourceId = ((_a = item == null ? void 0 : item.discount) == null ? void 0 : _a.resource_id) ?? (item == null ? void 0 : item.resource_id) ?? (item == null ? void 0 : item.discount_id) ?? (item == null ? void 0 : item.order_discount_id);
126
145
  if (resourceId === void 0 || resourceId === null || resourceId === "")
127
146
  continue;
@@ -144,7 +163,9 @@ var OrderModule = class extends import_BaseModule.BaseModule {
144
163
  if (existed) {
145
164
  existed.amount = Number(existed.amount || 0) + amount;
146
165
  existed.used_par_value = String(Number(existed.used_par_value || 0) + amount);
147
- existed.balance = String(Number(existed.balance || 0) + amount);
166
+ if (!isDiscountCard) {
167
+ existed.balance = String(Number(existed.balance || 0) + amount);
168
+ }
148
169
  const productIds = Array.isArray((_f = existed.limited_relation_product_data) == null ? void 0 : _f.product_ids) ? existed.limited_relation_product_data.product_ids : [];
149
170
  if ((product == null ? void 0 : product.product_id) !== void 0 && (product == null ? void 0 : product.product_id) !== null && !productIds.includes(product.product_id)) {
150
171
  existed.limited_relation_product_data = {
@@ -181,7 +202,7 @@ var OrderModule = class extends import_BaseModule.BaseModule {
181
202
  filter: 0,
182
203
  exclude_product_ids: []
183
204
  },
184
- balance: String((item == null ? void 0 : item.amount) ?? "0"),
205
+ balance: isDiscountCard ? void 0 : String((item == null ? void 0 : item.amount) ?? "0"),
185
206
  format_title: title,
186
207
  product: {
187
208
  id: (product == null ? void 0 : product.product_id) ?? 0,
@@ -307,7 +328,7 @@ var OrderModule = class extends import_BaseModule.BaseModule {
307
328
  });
308
329
  }
309
330
  async initialize(core, options) {
310
- var _a, _b, _c, _d;
331
+ var _a, _b, _c;
311
332
  this.core = core;
312
333
  this.store = options.store;
313
334
  if (!this.store.tempOrder) {
@@ -320,19 +341,19 @@ var OrderModule = class extends import_BaseModule.BaseModule {
320
341
  this.store.availableWalletIds = [];
321
342
  }
322
343
  this.request = this.core.getPlugin("request");
323
- const appPlugin = this.core.getPlugin("app");
324
- if (!appPlugin) {
325
- console.error("Order 模块需要 app 插件支持");
344
+ this.appPlugin = this.core.getPlugin("app");
345
+ if (!this.appPlugin) {
346
+ throw new Error("Order 模块需要 app 插件支持");
326
347
  }
327
- const app = (_a = appPlugin == null ? void 0 : appPlugin.getApp) == null ? void 0 : _a.call(appPlugin);
328
- this.logger = app == null ? void 0 : app.logger;
348
+ const app = this.appPlugin.getApp();
349
+ this.logger = app.logger;
329
350
  this.window = this.core.getPlugin("window");
330
351
  const otherParams = options.otherParams || {};
331
352
  this.cacheId = otherParams.cacheId;
332
353
  this.salesSummaryModuleName = otherParams.salesSummaryModuleName;
333
- this.rulesHooksOverride = (_b = otherParams.rules) == null ? void 0 : _b.hooks;
354
+ this.rulesHooksOverride = (_a = otherParams.rules) == null ? void 0 : _a.hooks;
334
355
  this.moduleHooksOverride = options.hooks;
335
- this.orderHooks = this.moduleHooksOverride || ((_c = otherParams.order) == null ? void 0 : _c.hooks) || ((_d = otherParams.hooks) == null ? void 0 : _d.order);
356
+ this.orderHooks = this.moduleHooksOverride || ((_b = otherParams.order) == null ? void 0 : _b.hooks) || ((_c = otherParams.hooks) == null ? void 0 : _c.order);
336
357
  this.otherParams = otherParams;
337
358
  this.registerDiscountModules(options);
338
359
  this.logInfo("OrderModule initialized successfully");
@@ -528,7 +549,7 @@ var OrderModule = class extends import_BaseModule.BaseModule {
528
549
  });
529
550
  }
530
551
  async scanCode(code, customerId) {
531
- var _a, _b, _c, _d;
552
+ var _a, _b, _c, _d, _e;
532
553
  const resultDiscountWithReason = await ((_a = this.store.discount) == null ? void 0 : _a.batchSearch(code, { customerId })) || { discountList: [], unavailableReasonKey: null };
533
554
  const { discountList: resultDiscountList, unavailableReasonKey } = resultDiscountWithReason;
534
555
  const rulesModule = this.store.rules;
@@ -536,6 +557,7 @@ var OrderModule = class extends import_BaseModule.BaseModule {
536
557
  return {
537
558
  type: "clientCalc",
538
559
  isAvailable: false,
560
+ isAccepted: false,
539
561
  discountList: this.getDiscountList(),
540
562
  scannedDiscountList: resultDiscountList,
541
563
  unavailableReason: import_types2.UnavailableReason.Unknown
@@ -545,6 +567,7 @@ var OrderModule = class extends import_BaseModule.BaseModule {
545
567
  return {
546
568
  type: "server",
547
569
  isAvailable: false,
570
+ isAccepted: false,
548
571
  discountList: this.getDiscountList(),
549
572
  scannedDiscountList: resultDiscountList,
550
573
  unavailableReasonKey
@@ -560,13 +583,19 @@ var OrderModule = class extends import_BaseModule.BaseModule {
560
583
  return {
561
584
  type: "clientCalc",
562
585
  isAvailable: true,
586
+ isAccepted: true,
563
587
  discountList: this.getDiscountList(),
564
588
  scannedDiscountList: resultDiscountList
565
589
  };
566
590
  }
567
591
  const tempOrder = this.store.tempOrder;
568
592
  const holders = ((_b = tempOrder == null ? void 0 : tempOrder.holder) == null ? void 0 : _b.form_record) || [];
569
- const { isAvailable, discountList: newDiscountList, unavailableReason } = rulesModule.isDiscountListAvailable({
593
+ const {
594
+ isAvailable,
595
+ discountList: newDiscountList,
596
+ evaluatedDiscountList,
597
+ unavailableReason
598
+ } = rulesModule.isDiscountListAvailable({
570
599
  productList: (tempOrder == null ? void 0 : tempOrder.products) || [],
571
600
  oldDiscountList: this.getDiscountList(),
572
601
  newDiscountList: withScanList,
@@ -574,15 +603,25 @@ var OrderModule = class extends import_BaseModule.BaseModule {
574
603
  holders,
575
604
  isFormSubject: (product) => (0, import_utils.resolveIsFormSubject)(tempOrder, product)
576
605
  }) || { isAvailable: false, discountList: this.getDiscountList() };
577
- if (isAvailable && newDiscountList) {
578
- (_d = this.store.discount) == null ? void 0 : _d.setDiscountList(newDiscountList);
606
+ const shouldRetainForLater = !isAvailable && unavailableReason === import_types2.UnavailableReason.ProductNotApplicable && withScanList.some(isCustomerPromotionDiscount);
607
+ const normalizedNewDiscountList = newDiscountList ? markScannedDiscounts(newDiscountList, withScanList) : void 0;
608
+ const retainedDiscountList = evaluatedDiscountList ? markScannedDiscounts(evaluatedDiscountList, withScanList) : normalizedNewDiscountList;
609
+ let resolvedDiscountList = normalizedNewDiscountList || this.getDiscountList();
610
+ if (isAvailable && normalizedNewDiscountList) {
611
+ await ((_d = this.store.discount) == null ? void 0 : _d.setDiscountList(normalizedNewDiscountList));
579
612
  this.applyDiscount();
580
613
  await this.syncScannedDiscountsToOriginalDiscountList(this.getDiscountList());
614
+ resolvedDiscountList = this.getDiscountList();
615
+ } else if (shouldRetainForLater && retainedDiscountList) {
616
+ await ((_e = this.store.discount) == null ? void 0 : _e.setDiscountList(retainedDiscountList));
617
+ await this.syncScannedDiscountsToOriginalDiscountList(this.getDiscountList());
618
+ resolvedDiscountList = this.getDiscountList();
581
619
  }
582
620
  return {
583
621
  type: "clientCalc",
584
622
  isAvailable: isAvailable || false,
585
- discountList: newDiscountList || this.getDiscountList(),
623
+ isAccepted: Boolean(isAvailable || shouldRetainForLater),
624
+ discountList: resolvedDiscountList,
586
625
  scannedDiscountList: resultDiscountList,
587
626
  unavailableReason
588
627
  };
@@ -841,16 +880,6 @@ var OrderModule = class extends import_BaseModule.BaseModule {
841
880
  /** @deprecated OrderModule 不再负责 tempOrder localStorage 持久化;草稿保存请使用 IndexedDB saveDraft。 */
842
881
  persistTempOrder() {
843
882
  }
844
- notifyTempOrderChanged() {
845
- if (!this.store.tempOrder)
846
- return;
847
- this.store.tempOrder = {
848
- ...this.store.tempOrder,
849
- products: [...this.store.tempOrder.products],
850
- bookings: this.store.tempOrder.bookings ? [...this.store.tempOrder.bookings] : []
851
- };
852
- this.persistTempOrder();
853
- }
854
883
  // ─── TempOrder: 创建 & 获取 ───
855
884
  createDefaultTempOrderInstance() {
856
885
  return (0, import_utils.createDefaultTempOrder)({
@@ -3889,7 +3918,7 @@ var OrderModule = class extends import_BaseModule.BaseModule {
3889
3918
  tempOrder,
3890
3919
  effectivePayments
3891
3920
  );
3892
- const submitParams = {
3921
+ const submitResult = await this.submitTempOrder({
3893
3922
  payments: effectivePayments,
3894
3923
  paymentStatus,
3895
3924
  smallTicketDataFlag: params.smallTicketDataFlag,
@@ -3903,8 +3932,7 @@ var OrderModule = class extends import_BaseModule.BaseModule {
3903
3932
  };
3904
3933
  return nextPayload;
3905
3934
  }
3906
- };
3907
- const submitResult = params.checkoutSyncTaskEnabled === false ? await this.submitTempOrderAsync(submitParams) : await this.submitTempOrder(submitParams);
3935
+ });
3908
3936
  return { ...completion, submitResult };
3909
3937
  }
3910
3938
  createOrder(params) {
@@ -3921,13 +3949,11 @@ var OrderModule = class extends import_BaseModule.BaseModule {
3921
3949
  is_deposit: 0,
3922
3950
  relation_products: [],
3923
3951
  relation_forms: [],
3924
- business_code: params == null ? void 0 : params.business_code,
3925
3952
  ...(params == null ? void 0 : params.extraData) || {}
3926
3953
  };
3927
3954
  let is_deposit = 0;
3928
3955
  if (params.cartItems.length > 0) {
3929
3956
  params.cartItems.forEach((item) => {
3930
- var _a2;
3931
3957
  if (!item._origin.duration) {
3932
3958
  const { duration, durationType } = (0, import_utils.generateDuration)(item);
3933
3959
  item._origin.duration = duration;
@@ -3936,9 +3962,6 @@ var OrderModule = class extends import_BaseModule.BaseModule {
3936
3962
  item._origin.sub_type = (0, import_utils.normalizeBookingSubType)(item._origin);
3937
3963
  const discountList = (0, import_utils.getAllDiscountList)(item);
3938
3964
  item._origin.product.discount_list = discountList;
3939
- if ((_a2 = params == null ? void 0 : params.extraData) == null ? void 0 : _a2.is_add_holder_info) {
3940
- (0, import_utils.ensureCartItemOriginHolder)(item, this.window);
3941
- }
3942
3965
  if ((0, import_utils2.isNormalProduct)(item._origin)) {
3943
3966
  order.relation_products.push(item._origin.product);
3944
3967
  const relationForms = item._origin.relation_forms || [];
@@ -165,6 +165,8 @@ export interface OrderCustomerChangePayload {
165
165
  }
166
166
  export interface OrderScanCodeResult {
167
167
  isAvailable: boolean;
168
+ /** 卡券已加入当前订单折扣列表,但不一定能立即应用。 */
169
+ isAccepted?: boolean;
168
170
  discountList: Discount[];
169
171
  scannedDiscountList: Discount[];
170
172
  type: 'server' | 'clientCalc';
@@ -394,7 +396,6 @@ export interface CommitOrderParams {
394
396
  type: 'virtual' | 'appointment_booking';
395
397
  platform?: string;
396
398
  extraData?: Record<string, any>;
397
- business_code?: string;
398
399
  };
399
400
  }
400
401
  export interface OrderSubmitBooking {
@@ -570,12 +571,6 @@ export interface SyncPaymentsToOrderParams {
570
571
  payments: OrderPaymentSource[];
571
572
  paymentStatus?: SubmitSalesOrderParams['query']['payment_status'];
572
573
  submitWhenPaid?: boolean;
573
- /**
574
- * Whether the checkout should be queued as the local `sync_sales` task.
575
- * Defaults to true to preserve the WebPOS retry path. Set to false when
576
- * the caller must wait for the cloud checkout response before proceeding.
577
- */
578
- checkoutSyncTaskEnabled?: boolean;
579
574
  smallTicketDataFlag?: number;
580
575
  businessCode?: string;
581
576
  channel?: string;
@@ -738,8 +733,6 @@ export interface OrderModuleAPI {
738
733
  setEnableTempOrderPersist: (enabled: boolean) => void;
739
734
  /** 是否允许 saveDraft 写入 IndexedDB 草稿。 */
740
735
  isTempOrderPersistEnabled: () => boolean;
741
- /** 提交 tempOrder 变更并触发 `{moduleName}:changed` 事件 */
742
- notifyTempOrderChanged: () => void;
743
736
  submitTempOrder: <T = any>(params?: {
744
737
  cacheId?: string;
745
738
  platform?: string;
@@ -15,7 +15,6 @@ export interface OrderProductsDepositSummary {
15
15
  deposit_policy_ids: number[];
16
16
  hasDeposit: boolean;
17
17
  }
18
- import type { WindowPlugin } from '../../plugins';
19
18
  /**
20
19
  * 把"含 option 的主商品单价"与 bundle 合成"单行 composite 单价"。
21
20
  *
@@ -178,15 +177,6 @@ export declare const mergeRelationForms: (relationForms: {
178
177
  form_id: number;
179
178
  form_record_ids: number[];
180
179
  }[];
181
- export interface CartOrderHolder {
182
- customer_id?: number;
183
- form_id: number | string;
184
- form_record: (number | string)[] | null;
185
- }
186
- /**
187
- * 为购物车行补齐订单所需的 holder 信息(与 cartAccount 结构保持一致)
188
- */
189
- export declare function ensureCartItemOriginHolder(cartItem: CartItem, window?: WindowPlugin): void;
190
180
  export declare const getAllDiscountList: (cartItem: CartItem) => any;
191
181
  export { createUuidV4 };
192
182
  export declare function isTempOrder(data: any): data is OrderTempOrder;
@@ -36,9 +36,8 @@ __export(utils_exports, {
36
36
  composeLinePrice: () => composeLinePrice,
37
37
  createDefaultOrderRulesHooks: () => createDefaultOrderRulesHooks,
38
38
  createDefaultTempOrder: () => createDefaultTempOrder,
39
- createEmptySummary: () => import_utils3.createEmptySummary,
39
+ createEmptySummary: () => import_utils2.createEmptySummary,
40
40
  createUuidV4: () => import_orderCollectionIdentity.createUuidV4,
41
- ensureCartItemOriginHolder: () => ensureCartItemOriginHolder,
42
41
  ensureManualProductDiscountList: () => import_manualProductDiscount.ensureManualProductDiscountList,
43
42
  ensureProductSku: () => ensureProductSku,
44
43
  findManualProductDiscountItem: () => import_manualProductDiscount.findManualProductDiscountItem,
@@ -86,10 +85,9 @@ __export(utils_exports, {
86
85
  module.exports = __toCommonJS(utils_exports);
87
86
  var import_dayjs = __toESM(require("dayjs"));
88
87
  var import_decimal = __toESM(require("decimal.js"));
89
- var import_utils = require("../Holder/utils");
90
- var import_utils2 = require("../../solution/ScanOrder/utils");
88
+ var import_utils = require("../../solution/ScanOrder/utils");
91
89
  var import_orderCollectionIdentity = require("./utils/orderCollectionIdentity");
92
- var import_utils3 = require("../../solution/ScanOrder/utils");
90
+ var import_utils2 = require("../../solution/ScanOrder/utils");
93
91
  var import_manualProductDiscount = require("./utils/manualProductDiscount");
94
92
  function composeLinePrice(params) {
95
93
  const { mainPrice, bundle, useOriginalBundle } = params;
@@ -548,7 +546,7 @@ function createDefaultOrderRulesHooks() {
548
546
  // 否则同 SKU 不同小料会在 calcDiscount 重组时互相覆盖。
549
547
  // 不透明 identity 契约下,normalizeOrderProduct / hydrate 已保证唯一值存在;
550
548
  // 留 fingerprint 分支仅作 Rules 单测里直接传裸 product 时的兜底。
551
- _id: ((_a = product.metadata) == null ? void 0 : _a.unique_identification_number) ? `${product.product_id}_${product.product_variant_id}_${product.metadata.unique_identification_number}` : `${product.product_id}_${product.product_variant_id}_${(0, import_utils2.buildProductLineFingerprint)(
549
+ _id: ((_a = product.metadata) == null ? void 0 : _a.unique_identification_number) ? `${product.product_id}_${product.product_variant_id}_${product.metadata.unique_identification_number}` : `${product.product_id}_${product.product_variant_id}_${(0, import_utils.buildProductLineFingerprint)(
552
550
  getProductSkuOptions(product),
553
551
  product.product_bundle
554
552
  )}`,
@@ -640,34 +638,6 @@ var mergeRelationForms = (relationForms) => {
640
638
  }, {})
641
639
  ).filter((item) => item.form_record_ids.length > 0);
642
640
  };
643
- function getCustomerIdFromStorage(window) {
644
- var _a;
645
- try {
646
- const customer = JSON.parse(((_a = window == null ? void 0 : window.getLocalStorage) == null ? void 0 : _a.call(window, "customer")) || "{}");
647
- const customerId = Number(customer == null ? void 0 : customer.id);
648
- return Number.isFinite(customerId) && customerId > 0 ? customerId : void 0;
649
- } catch {
650
- return void 0;
651
- }
652
- }
653
- function ensureCartItemOriginHolder(cartItem, window) {
654
- var _a;
655
- if ((_a = cartItem == null ? void 0 : cartItem._origin) == null ? void 0 : _a.holder) {
656
- return;
657
- }
658
- const holderConfig = (0, import_utils.getProductHolderConfig)(
659
- (cartItem == null ? void 0 : cartItem._productInit) ?? (cartItem == null ? void 0 : cartItem._productOrigin)
660
- );
661
- const formRecordId = cartItem == null ? void 0 : cartItem.holder_id;
662
- if (!(holderConfig == null ? void 0 : holderConfig.resource_id) || formRecordId == null) {
663
- return;
664
- }
665
- cartItem._origin.holder = {
666
- customer_id: getCustomerIdFromStorage(window),
667
- form_id: holderConfig.resource_id,
668
- form_record: [formRecordId]
669
- };
670
- }
671
641
  var getAllDiscountList = (cartItem) => {
672
642
  var _a, _b, _c, _d;
673
643
  let discountList = ((_b = (_a = cartItem == null ? void 0 : cartItem._origin) == null ? void 0 : _a.product) == null ? void 0 : _b.discount_list) || [];
@@ -1033,7 +1003,7 @@ function buildSubmitPayload(params) {
1033
1003
  // contacts: tempOrder.contacts || [],
1034
1004
  contacts_info: tempOrder.contacts_info && !Array.isArray(tempOrder.contacts_info) ? tempOrder.contacts_info : null,
1035
1005
  // holder: tempOrder.holder || null,
1036
- summary: summary || tempOrder.summary || (0, import_utils2.createEmptySummary)(),
1006
+ summary: summary || tempOrder.summary || (0, import_utils.createEmptySummary)(),
1037
1007
  metadata: (() => {
1038
1008
  const {
1039
1009
  collect_pax: _collectPax,
@@ -1282,7 +1252,6 @@ function indexOrderProductsByUid(products) {
1282
1252
  createDefaultTempOrder,
1283
1253
  createEmptySummary,
1284
1254
  createUuidV4,
1285
- ensureCartItemOriginHolder,
1286
1255
  ensureManualProductDiscountList,
1287
1256
  ensureProductSku,
1288
1257
  findManualProductDiscountItem,
@@ -21,11 +21,13 @@ export declare class WalletPassPaymentImpl implements WalletPassPayment {
21
21
  private emitEvent;
22
22
  private publishWalletAssetsState;
23
23
  private recalculateWalletAssets;
24
+ /** 获取当前缓存中所有支付类 Wallet 资产的扫码 code。 */
25
+ private getSearchedWalletAssetCodes;
24
26
  /**
25
- * 使用最新订单参数重验扫码搜索过的支付类 Wallet 资产。
26
- * 请求失败或暂时无匹配结果时保留旧资产,避免商品变化造成列表闪空。
27
+ * 用订单重算接口返回的数据更新扫码 Wallet 缓存。
28
+ * 接口暂时缺失某个扫码 code 时继续保留旧值,避免列表闪空。
27
29
  */
28
- private revalidateSearchedWalletAssets;
30
+ private syncSearchedWalletAssets;
29
31
  /**
30
32
  * 生成钱包API默认参数
31
33
  * 根据业务数据生成标准的钱包API参数,并存储在模块中
@@ -67,6 +69,11 @@ export declare class WalletPassPaymentImpl implements WalletPassPayment {
67
69
  noApplicableVoucher: any[];
68
70
  products: any[];
69
71
  }>;
72
+ /**
73
+ * 商品或订单金额变化后,使用聚合接口一次重算已选与剩余 WalletPass。
74
+ * Walk-In 不发送 customer_id;会员才携带真实 customer_id。
75
+ */
76
+ private aggregateRecalculateWalletAssetsAsync;
70
77
  getWalletPassRecommendListAsync(params: WalletDeductionRecommendParams): Promise<WalletRecommendItem[]>;
71
78
  formatWalletPassList2PreparePayments(list: WalletRecommendItem[]): {
72
79
  voucher_id: number;