@pisell/pisellos 2.3.124 → 2.3.126

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 (93) hide show
  1. package/dist/model/strategy/adapter/promotion/index.js +9 -0
  2. package/dist/model/strategy/adapter/walletPass/evaluator.d.ts +0 -2
  3. package/dist/model/strategy/adapter/walletPass/evaluator.js +2 -4
  4. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +19 -58
  5. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +12 -24
  6. package/dist/modules/Customer/index.js +3 -6
  7. package/dist/modules/Customer/types.d.ts +0 -2
  8. package/dist/modules/Discount/index.d.ts +2 -2
  9. package/dist/modules/Discount/index.js +151 -37
  10. package/dist/modules/Discount/types.d.ts +5 -36
  11. package/dist/modules/Order/index.d.ts +12 -7
  12. package/dist/modules/Order/index.js +307 -432
  13. package/dist/modules/Order/types.d.ts +5 -0
  14. package/dist/modules/Order/utils/orderCollectionIdentity.js +12 -16
  15. package/dist/modules/Order/utils.d.ts +11 -1
  16. package/dist/modules/Order/utils.js +127 -122
  17. package/dist/modules/Payment/types.d.ts +1 -21
  18. package/dist/modules/Payment/types.js +0 -2
  19. package/dist/modules/Payment/walletpass.d.ts +1 -1
  20. package/dist/modules/Payment/walletpass.js +47 -80
  21. package/dist/modules/Rules/index.d.ts +2 -2
  22. package/dist/modules/Rules/index.js +186 -480
  23. package/dist/modules/Rules/types.d.ts +0 -4
  24. package/dist/server/modules/order/types.d.ts +0 -2
  25. package/dist/solution/BaseSales/index.d.ts +0 -1
  26. package/dist/solution/BaseSales/index.js +59 -51
  27. package/dist/solution/BaseSales/types.d.ts +2 -2
  28. package/dist/solution/BaseSales/utils/cartPromotion.js +126 -141
  29. package/dist/solution/BookingByStep/index.d.ts +1 -1
  30. package/dist/solution/BookingTicket/index.d.ts +2 -1
  31. package/dist/solution/BookingTicket/index.js +63 -60
  32. package/dist/solution/BookingTicket/types.d.ts +1 -5
  33. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -2
  34. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +147 -338
  35. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +4 -8
  36. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -6
  37. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.js +6 -19
  38. package/dist/solution/ShopDiscount/index.d.ts +0 -2
  39. package/dist/solution/ShopDiscount/index.js +42 -99
  40. package/dist/solution/ShopDiscount/utils.d.ts +2 -4
  41. package/dist/solution/ShopDiscount/utils.js +23 -43
  42. package/dist/solution/UnifiedBookingSales/index.js +2 -2
  43. package/lib/model/strategy/adapter/promotion/index.js +1 -46
  44. package/lib/model/strategy/adapter/walletPass/evaluator.d.ts +0 -2
  45. package/lib/model/strategy/adapter/walletPass/evaluator.js +0 -2
  46. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +6 -35
  47. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +6 -13
  48. package/lib/modules/Customer/index.js +1 -5
  49. package/lib/modules/Customer/types.d.ts +0 -2
  50. package/lib/modules/Discount/index.d.ts +2 -2
  51. package/lib/modules/Discount/index.js +129 -23
  52. package/lib/modules/Discount/types.d.ts +5 -36
  53. package/lib/modules/Order/index.d.ts +12 -7
  54. package/lib/modules/Order/index.js +107 -215
  55. package/lib/modules/Order/types.d.ts +5 -0
  56. package/lib/modules/Order/utils/orderCollectionIdentity.js +11 -14
  57. package/lib/modules/Order/utils.d.ts +11 -1
  58. package/lib/modules/Order/utils.js +45 -39
  59. package/lib/modules/Payment/types.d.ts +1 -21
  60. package/lib/modules/Payment/types.js +0 -1
  61. package/lib/modules/Payment/walletpass.d.ts +1 -1
  62. package/lib/modules/Payment/walletpass.js +9 -29
  63. package/lib/modules/Rules/index.d.ts +2 -2
  64. package/lib/modules/Rules/index.js +110 -357
  65. package/lib/modules/Rules/types.d.ts +0 -4
  66. package/lib/server/modules/order/types.d.ts +0 -2
  67. package/lib/solution/BaseSales/index.d.ts +0 -1
  68. package/lib/solution/BaseSales/index.js +12 -5
  69. package/lib/solution/BaseSales/types.d.ts +2 -2
  70. package/lib/solution/BaseSales/utils/cartPromotion.js +4 -12
  71. package/lib/solution/BookingByStep/index.d.ts +1 -1
  72. package/lib/solution/BookingTicket/index.d.ts +2 -1
  73. package/lib/solution/BookingTicket/index.js +33 -36
  74. package/lib/solution/BookingTicket/types.d.ts +1 -5
  75. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -2
  76. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +42 -174
  77. package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +4 -8
  78. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -6
  79. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +3 -11
  80. package/lib/solution/ShopDiscount/index.d.ts +0 -2
  81. package/lib/solution/ShopDiscount/index.js +9 -55
  82. package/lib/solution/ShopDiscount/utils.d.ts +2 -4
  83. package/lib/solution/ShopDiscount/utils.js +25 -42
  84. package/lib/solution/UnifiedBookingSales/index.js +2 -2
  85. package/package.json +1 -1
  86. package/dist/modules/Discount/availability.d.ts +0 -7
  87. package/dist/modules/Discount/availability.js +0 -49
  88. package/dist/modules/Discount/entitlementPass.d.ts +0 -34
  89. package/dist/modules/Discount/entitlementPass.js +0 -147
  90. package/lib/modules/Discount/availability.d.ts +0 -7
  91. package/lib/modules/Discount/availability.js +0 -43
  92. package/lib/modules/Discount/entitlementPass.d.ts +0 -34
  93. package/lib/modules/Discount/entitlementPass.js +0 -141
@@ -412,8 +412,6 @@ export interface WalletAssetsBehaviorOptions {
412
412
  export interface RefreshWalletAssetsOptions {
413
413
  /** 商品/金额变化默认保留并重验选择;客户变化由实现层强制清空。 */
414
414
  preserveSelection?: boolean;
415
- /** 客户变化时,仅保留与本次扫码匹配的搜索结果;其他搜索缓存仍会清空。 */
416
- retainSearchResultCodes?: string[];
417
415
  }
418
416
  export interface SelectWalletAssetOptions {
419
417
  selected: boolean;
@@ -421,8 +419,6 @@ export interface SelectWalletAssetOptions {
421
419
  }
422
420
  export interface ScanWalletAssetResult {
423
421
  type: SearchIdentificationCodeResult['type'];
424
- /** walletCode 时保留完整 Wallet Detail,供客户解析与客户选择器使用。 */
425
- data?: WalletDetailSearchData;
426
422
  asset?: any;
427
423
  selected: boolean;
428
424
  state: WalletAssetsState;
@@ -868,8 +864,6 @@ export interface SearchIdentificationCodeParams extends WalletDeductionRecommend
868
864
  * 搜索识别码响应数据
869
865
  */
870
866
  export interface SearchIdentificationCodeResponse {
871
- /** 业务是否成功 */
872
- status?: boolean;
873
867
  /** 响应状态码 */
874
868
  code?: number;
875
869
  /** 响应消息 */
@@ -877,26 +871,12 @@ export interface SearchIdentificationCodeResponse {
877
871
  /** 响应数据 */
878
872
  data?: SearchIdentificationCodeItem[];
879
873
  }
880
- /** Wallet code 精确搜索返回的 Wallet Detail。 */
881
- export interface WalletDetailSearchData {
882
- id?: string | number;
883
- customer_id?: string | number;
884
- customer?: Record<string, any> | null;
885
- is_cross_shop_wallet?: boolean | 0 | 1;
886
- [key: string]: any;
887
- }
888
- export interface WalletDetailSearchResponse {
889
- status?: boolean;
890
- code?: number;
891
- message?: string;
892
- data?: WalletDetailSearchData | null;
893
- }
894
874
  /**
895
875
  * 搜索识别码结果类型
896
876
  */
897
877
  export type SearchIdentificationCodeResult = {
898
878
  type: 'walletCode';
899
- data: WalletDetailSearchData;
879
+ data: SearchIdentificationCodeItem[];
900
880
  } | {
901
881
  type: 'normalCode';
902
882
  data: SearchIdentificationCodeItem[];
@@ -262,8 +262,6 @@ export var PaymentHooks = /*#__PURE__*/function (PaymentHooks) {
262
262
  * 搜索识别码响应数据
263
263
  */
264
264
 
265
- /** Wallet code 精确搜索返回的 Wallet Detail。 */
266
-
267
265
  /**
268
266
  * 搜索识别码结果类型
269
267
  */
@@ -96,7 +96,7 @@ export declare class WalletPassPaymentImpl implements WalletPassPayment {
96
96
  * 搜索识别码信息
97
97
  * 通过识别码搜索相关的钱包通行证信息
98
98
  * 基于 WalletDeductionRecommendParams 参数结构
99
- * 特殊逻辑:WL 或指定 200 格式的 Wallet Code 调用 /wallet/detail/search 接口。
99
+ * 特殊逻辑:当识别码长度为9位且前3位为"000"时,调用 /wallet/detail/search 接口
100
100
  */
101
101
  searchIdentificationCodeAsync(params: SearchIdentificationCodeParams, config?: {
102
102
  noCache?: boolean;
@@ -933,7 +933,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
933
933
  * 搜索识别码信息
934
934
  * 通过识别码搜索相关的钱包通行证信息
935
935
  * 基于 WalletDeductionRecommendParams 参数结构
936
- * 特殊逻辑:WL 或指定 200 格式的 Wallet Code 调用 /wallet/detail/search 接口。
936
+ * 特殊逻辑:当识别码长度为9位且前3位为"000"时,调用 /wallet/detail/search 接口
937
937
  */
938
938
  }, {
939
939
  key: "searchIdentificationCodeAsync",
@@ -957,7 +957,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
957
957
  isWalletCode,
958
958
  walletDetailParams,
959
959
  _response,
960
- walletDetail,
960
+ _searchResults,
961
961
  baseWalletParams,
962
962
  searchParams,
963
963
  response,
@@ -981,14 +981,13 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
981
981
  // 新钱包规则
982
982
  isWalletCode = code.startsWith('WL') || code.startsWith('200') && code.length === 10;
983
983
  if (!isWalletCode) {
984
- _context7.next = 16;
984
+ _context7.next = 14;
985
985
  break;
986
986
  }
987
987
  // 钱包识别码直接调用专门接口,不缓存,直接返回
988
988
  walletDetailParams = {
989
989
  code: code,
990
990
  with_customer: 1,
991
- with_franchisor_data: 1,
992
991
  with: ['wallet']
993
992
  };
994
993
  this.paymentModule.logInfo('[WalletPass] 搜索钱包识别码', {
@@ -1000,23 +999,17 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1000
999
  return this.paymentModule.request.post('/wallet/detail/search', walletDetailParams);
1001
1000
  case 10:
1002
1001
  _response = _context7.sent;
1003
- walletDetail = _response === null || _response === void 0 ? void 0 : _response.data;
1004
- if (!((_response === null || _response === void 0 ? void 0 : _response.status) !== true || (_response === null || _response === void 0 ? void 0 : _response.code) !== 200 || !walletDetail || _typeof(walletDetail) !== 'object' || Array.isArray(walletDetail))) {
1005
- _context7.next = 14;
1006
- break;
1007
- }
1008
- throw new Error((_response === null || _response === void 0 ? void 0 : _response.message) || 'Wallet detail search failed');
1009
- case 14:
1002
+ _searchResults = (_response === null || _response === void 0 ? void 0 : _response.data) || [];
1010
1003
  this.paymentModule.logInfo('[WalletPass] 钱包识别码搜索完成', {
1011
1004
  code: code,
1012
- results_count: 1,
1005
+ results_count: _searchResults.length,
1013
1006
  type: 'walletCode'
1014
1007
  });
1015
1008
  return _context7.abrupt("return", {
1016
1009
  type: 'walletCode',
1017
- data: walletDetail
1010
+ data: _searchResults
1018
1011
  });
1019
- case 16:
1012
+ case 14:
1020
1013
  // 合并钱包参数和搜索参数
1021
1014
  baseWalletParams = this.walletParams; // 构建完整的搜索参数,包含钱包扣款推荐的所有参数
1022
1015
  searchParams = {
@@ -1044,20 +1037,20 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1044
1037
  if (typeof searchParams.payment_order_id === 'string' && searchParams.payment_order_id.startsWith('LOCAL_')) {
1045
1038
  searchParams.payment_order_id = undefined;
1046
1039
  }
1047
- _context7.next = 22;
1040
+ _context7.next = 20;
1048
1041
  return this.paymentModule.request.post('/machinecode/prepare/deduction/search', searchParams);
1049
- case 22:
1042
+ case 20:
1050
1043
  response = _context7.sent;
1051
1044
  searchResults = (response === null || response === void 0 ? void 0 : response.data) || [];
1052
1045
  if (!config.noCache) {
1053
- _context7.next = 26;
1046
+ _context7.next = 24;
1054
1047
  break;
1055
1048
  }
1056
1049
  return _context7.abrupt("return", {
1057
1050
  type: 'normalCode',
1058
1051
  data: searchResults
1059
1052
  });
1060
- case 26:
1053
+ case 24:
1061
1054
  // 将搜索结果存储到缓存数组中
1062
1055
  if (searchResults.length > 0) {
1063
1056
  // 避免重复存储相同的识别码
@@ -1087,8 +1080,8 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1087
1080
  type: 'normalCode',
1088
1081
  data: searchResults
1089
1082
  });
1090
- case 32:
1091
- _context7.prev = 32;
1083
+ case 30:
1084
+ _context7.prev = 30;
1092
1085
  _context7.t0 = _context7["catch"](1);
1093
1086
  this.paymentModule.logError('[WalletPass] 搜索识别码信息失败', _context7.t0, {
1094
1087
  code: params.code,
@@ -1096,11 +1089,11 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1096
1089
  order_expect_amount: params.order_expect_amount
1097
1090
  });
1098
1091
  throw _context7.t0;
1099
- case 36:
1092
+ case 34:
1100
1093
  case "end":
1101
1094
  return _context7.stop();
1102
1095
  }
1103
- }, _callee7, this, [[1, 32]]);
1096
+ }, _callee7, this, [[1, 30]]);
1104
1097
  }));
1105
1098
  function searchIdentificationCodeAsync(_x8) {
1106
1099
  return _searchIdentificationCodeAsync.apply(this, arguments);
@@ -1126,9 +1119,6 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1126
1119
  previousCustomerId,
1127
1120
  customerChanged,
1128
1121
  preserveSelection,
1129
- retainedSearchCodeKeys,
1130
- retainedSearchResults,
1131
- preserveSearchContext,
1132
1122
  committedKeys,
1133
1123
  committedItems,
1134
1124
  selectedIds,
@@ -1163,20 +1153,9 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1163
1153
  previousCustomerId = this.walletAssetsState.customerId;
1164
1154
  customerChanged = String(previousCustomerId !== null && previousCustomerId !== void 0 ? previousCustomerId : '') !== String(nextCustomerId !== null && nextCustomerId !== void 0 ? nextCustomerId : '');
1165
1155
  preserveSelection = options.preserveSelection !== false && !customerChanged;
1166
- retainedSearchCodeKeys = new Set((options.retainSearchResultCodes || []).map(normalizeWalletAssetCode).filter(Boolean));
1167
- retainedSearchResults = customerChanged && retainedSearchCodeKeys.size > 0 ? this.searchResults.filter(function (item) {
1168
- return isWalletPaymentAsset(item) && getWalletAssetCodeKeys(item).some(function (code) {
1169
- return retainedSearchCodeKeys.has(code);
1170
- });
1171
- }) : [];
1172
1156
  if (customerChanged) {
1173
1157
  this.clearSearchResults();
1174
- if (retainedSearchResults.length > 0) {
1175
- this.searchResults = mergeWalletAssets(retainedSearchResults);
1176
- this.queuePendingAutoSelectForAssets(retainedSearchResults);
1177
- }
1178
1158
  }
1179
- preserveSearchContext = preserveSelection || retainedSearchResults.length > 0;
1180
1159
  committedKeys = new Set(this.walletAssetsState.committedIds.map(function (id) {
1181
1160
  return String(id);
1182
1161
  }));
@@ -1201,7 +1180,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1201
1180
  // 清空购物车时保留扫码资产供后续加购恢复;只有手动 Remove/Clear
1202
1181
  // 会取消自动应用资格,商品变化导致的自动失效需要重新进入待选队列。
1203
1182
  if ((_businessData$product2 = businessData.products) !== null && _businessData$product2 !== void 0 && _businessData$product2.length) {
1204
- _context8.next = 27;
1183
+ _context8.next = 24;
1205
1184
  break;
1206
1185
  }
1207
1186
  this.queuePendingAutoSelectForAssets(scanSelectedAssets);
@@ -1239,7 +1218,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1239
1218
  totalSelectedAmount: 0,
1240
1219
  error: null
1241
1220
  }));
1242
- case 27:
1221
+ case 24:
1243
1222
  this.publishWalletAssetsState({
1244
1223
  status: 'loading',
1245
1224
  customerId: nextCustomerId,
@@ -1250,40 +1229,40 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1250
1229
  totalSelectedAmount: preserveSelection ? this.walletAssetsState.totalSelectedAmount : 0,
1251
1230
  error: null
1252
1231
  });
1253
- _context8.prev = 28;
1254
- searchedWalletAssetCodes = preserveSearchContext ? this.getSearchedWalletAssetCodes() : [];
1255
- useAggregateRecalculate = preserveSearchContext && (selectedIds.length > 0 || searchedWalletAssetCodes.length > 0);
1232
+ _context8.prev = 25;
1233
+ searchedWalletAssetCodes = preserveSelection ? this.getSearchedWalletAssetCodes() : [];
1234
+ useAggregateRecalculate = preserveSelection && (selectedIds.length > 0 || searchedWalletAssetCodes.length > 0);
1256
1235
  if (!useAggregateRecalculate) {
1257
- _context8.next = 37;
1236
+ _context8.next = 34;
1258
1237
  break;
1259
1238
  }
1260
- _context8.next = 34;
1239
+ _context8.next = 31;
1261
1240
  return this.aggregateRecalculateWalletAssetsAsync(businessData, selectedIds);
1262
- case 34:
1241
+ case 31:
1263
1242
  _context8.t0 = _context8.sent;
1264
- _context8.next = 38;
1243
+ _context8.next = 35;
1265
1244
  break;
1266
- case 37:
1245
+ case 34:
1267
1246
  _context8.t0 = null;
1268
- case 38:
1247
+ case 35:
1269
1248
  aggregateResult = _context8.t0;
1270
1249
  _context8.t1 = aggregateResult;
1271
1250
  if (_context8.t1) {
1272
- _context8.next = 44;
1251
+ _context8.next = 41;
1273
1252
  break;
1274
1253
  }
1275
- _context8.next = 43;
1254
+ _context8.next = 40;
1276
1255
  return this.initializeWalletDataFromBusinessAsync(businessData);
1277
- case 43:
1256
+ case 40:
1278
1257
  _context8.t1 = _context8.sent;
1279
- case 44:
1258
+ case 41:
1280
1259
  result = _context8.t1;
1281
1260
  if (!(requestSequence !== this.walletAssetsRequestSequence)) {
1282
- _context8.next = 47;
1261
+ _context8.next = 44;
1283
1262
  break;
1284
1263
  }
1285
1264
  return _context8.abrupt("return", this.getWalletAssetsState());
1286
- case 47:
1265
+ case 44:
1287
1266
  this.walletAssetsCalculationContext = {
1288
1267
  orderTotalAmount: Number(businessData.order_wait_pay_amount || 0),
1289
1268
  products: result.products || businessData.products || []
@@ -1304,13 +1283,13 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1304
1283
  });
1305
1284
  }
1306
1285
  }
1307
- searchedWalletAssets = preserveSearchContext ? this.syncSearchedWalletAssets([].concat(_toConsumableArray(result.transformList || []), _toConsumableArray(result.noApplicableVoucher || []))) : [];
1286
+ searchedWalletAssets = preserveSelection ? this.syncSearchedWalletAssets([].concat(_toConsumableArray(result.transformList || []), _toConsumableArray(result.noApplicableVoucher || []))) : [];
1308
1287
  if (!(requestSequence !== this.walletAssetsRequestSequence)) {
1309
- _context8.next = 53;
1288
+ _context8.next = 50;
1310
1289
  break;
1311
1290
  }
1312
1291
  return _context8.abrupt("return", this.getWalletAssetsState());
1313
- case 53:
1292
+ case 50:
1314
1293
  recommendedKeys = new Set((result.walletRecommendList || []).map(function (asset) {
1315
1294
  return getWalletAssetKey(asset);
1316
1295
  }));
@@ -1356,15 +1335,15 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1356
1335
  });
1357
1336
  this.queuePendingAutoSelectForAssets(droppedScanSelectedAssets);
1358
1337
  return _context8.abrupt("return", nextState);
1359
- case 68:
1360
- _context8.prev = 68;
1361
- _context8.t2 = _context8["catch"](28);
1338
+ case 65:
1339
+ _context8.prev = 65;
1340
+ _context8.t2 = _context8["catch"](25);
1362
1341
  if (!(requestSequence !== this.walletAssetsRequestSequence)) {
1363
- _context8.next = 72;
1342
+ _context8.next = 69;
1364
1343
  break;
1365
1344
  }
1366
1345
  return _context8.abrupt("return", this.getWalletAssetsState());
1367
- case 72:
1346
+ case 69:
1368
1347
  this.paymentModule.logError('[WalletPass] 刷新共享钱包资产失败,保留刷新前状态', _context8.t2, {
1369
1348
  customer_id: businessData.customer_id,
1370
1349
  selected_ids: selectedIds,
@@ -1380,11 +1359,11 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1380
1359
  customerId: nextCustomerId,
1381
1360
  error: _context8.t2 instanceof Error ? _context8.t2.message : String(_context8.t2)
1382
1361
  }));
1383
- case 74:
1362
+ case 71:
1384
1363
  case "end":
1385
1364
  return _context8.stop();
1386
1365
  }
1387
- }, _callee8, this, [[28, 68]]);
1366
+ }, _callee8, this, [[25, 65]]);
1388
1367
  }));
1389
1368
  function refreshWalletAssetsFromBusinessAsync(_x9) {
1390
1369
  return _refreshWalletAssetsFromBusinessAsync.apply(this, arguments);
@@ -1562,18 +1541,6 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1562
1541
  }));
1563
1542
  case 9:
1564
1543
  result = _context9.sent;
1565
- if (!(result.type === 'walletCode')) {
1566
- _context9.next = 12;
1567
- break;
1568
- }
1569
- return _context9.abrupt("return", {
1570
- type: 'walletCode',
1571
- data: result.data,
1572
- asset: result.data,
1573
- selected: false,
1574
- state: this.getWalletAssetsState()
1575
- });
1576
- case 12:
1577
1544
  paymentAssets = this.formatSearchedWalletPaymentAssets(result.data.filter(isWalletPaymentAsset));
1578
1545
  if (paymentAssets.length > 0) {
1579
1546
  this.searchResults = mergeWalletAssets(this.searchResults, paymentAssets);
@@ -1581,17 +1548,17 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1581
1548
  asset = paymentAssets.find(function (item) {
1582
1549
  return String((item === null || item === void 0 ? void 0 : item.code) || '') === normalizedCode;
1583
1550
  }) || paymentAssets[0];
1584
- if (asset) {
1585
- _context9.next = 17;
1551
+ if (!(!asset || result.type === 'walletCode')) {
1552
+ _context9.next = 15;
1586
1553
  break;
1587
1554
  }
1588
1555
  return _context9.abrupt("return", {
1589
- type: 'normalCode',
1556
+ type: result.type,
1590
1557
  asset: asset,
1591
1558
  selected: false,
1592
1559
  state: this.getWalletAssetsState()
1593
1560
  });
1594
- case 17:
1561
+ case 15:
1595
1562
  items = mergeWalletAssets(this.walletAssetsState.items, [asset]);
1596
1563
  recalculatedState = this.recalculateWalletAssets(items, this.walletAssetsState.selectedIds, this.walletAssetsState.selectionSources);
1597
1564
  assetId = getWalletAssetId(asset);
@@ -1621,7 +1588,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
1621
1588
  selected: isSelected,
1622
1589
  state: selected
1623
1590
  });
1624
- case 27:
1591
+ case 25:
1625
1592
  case "end":
1626
1593
  return _context9.stop();
1627
1594
  }
@@ -16,8 +16,8 @@ export declare class RulesModule extends BaseModule implements Module, RulesModu
16
16
  getWalletPassEvaluator(): import("../..").WalletPassEvaluator | undefined;
17
17
  private normalizeHolderRecordIds;
18
18
  /**
19
- * 商品未开启 Holder 选择时跳过匹配;已开启时,特定 form Holder 卡
20
- * 只适用于同一 Holder Record,是否必填不影响匹配规则。
19
+ * 特定 form Holder 卡只授权给绑定同一 Holder Record 的商品行。
20
+ * required/isNeedHolder 仅控制是否强制选择 Holder,不参与优惠资格。
21
21
  */
22
22
  private checkHolderMatch;
23
23
  isDiscountListAvailable({ oldDiscountList, newDiscountList, productList, orderTotalAmount, holders, isFormSubject, }: {