@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
@@ -144,7 +144,6 @@ var Server = /*#__PURE__*/function () {
144
144
  while (1) switch (_context.prev = _context.next) {
145
145
  case 0:
146
146
  url = _ref.url, method = _ref.method, data = _ref.data, config = _ref.config;
147
- console.log('[Server] handleProductQuery:', url, method, data, config);
148
147
  menu_list_ids = data.menu_list_ids, schedule_datetime = data.schedule_datetime, schedule_date = data.schedule_date;
149
148
  _ref3 = config || {}, callback = _ref3.callback, subscriberId = _ref3.subscriberId;
150
149
  _this.logInfo('handleProductQuery: 开始处理商品查询请求', {
@@ -173,7 +172,7 @@ var Server = /*#__PURE__*/function () {
173
172
  schedule_date: schedule_date,
174
173
  schedule_datetime: schedule_datetime
175
174
  }));
176
- case 7:
175
+ case 6:
177
176
  case "end":
178
177
  return _context.stop();
179
178
  }
@@ -221,7 +220,6 @@ var Server = /*#__PURE__*/function () {
221
220
  while (1) switch (_context3.prev = _context3.next) {
222
221
  case 0:
223
222
  url = _ref7.url, method = _ref7.method, data = _ref7.data, config = _ref7.config;
224
- console.log('[Server] handleOrderList:', url, method, data, config);
225
223
  queryPayload = data && _typeof(data) === 'object' ? _objectSpread({}, data) : {};
226
224
  _ref9 = config || {}, callback = _ref9.callback, subscriberId = _ref9.subscriberId;
227
225
  _this.logInfo('handleOrderList: 开始处理订单列表请求', {
@@ -238,7 +236,7 @@ var Server = /*#__PURE__*/function () {
238
236
  });
239
237
  }
240
238
  return _context3.abrupt("return", _this.computeOrderQueryResult(queryPayload));
241
- case 7:
239
+ case 6:
242
240
  case "end":
243
241
  return _context3.stop();
244
242
  }
@@ -292,7 +290,6 @@ var Server = /*#__PURE__*/function () {
292
290
  while (1) switch (_context5.prev = _context5.next) {
293
291
  case 0:
294
292
  url = _ref13.url, method = _ref13.method, data = _ref13.data, config = _ref13.config;
295
- console.log('[Server] handleBookingList:', url, method, data, config);
296
293
  queryPayload = data && _typeof(data) === 'object' ? _objectSpread({}, data) : {};
297
294
  _ref15 = config || {}, callback = _ref15.callback, subscriberId = _ref15.subscriberId;
298
295
  isToday = _this.isBookingQueryForToday(queryPayload);
@@ -301,7 +298,7 @@ var Server = /*#__PURE__*/function () {
301
298
  isToday: isToday
302
299
  });
303
300
  if (!isToday) {
304
- _context5.next = 11;
301
+ _context5.next = 10;
305
302
  break;
306
303
  }
307
304
  if (subscriberId && typeof callback === 'function') {
@@ -315,7 +312,7 @@ var Server = /*#__PURE__*/function () {
315
312
  });
316
313
  }
317
314
  return _context5.abrupt("return", _this.computeBookingQueryResult(queryPayload));
318
- case 11:
315
+ case 10:
319
316
  if (subscriberId) {
320
317
  _this.bookingQuerySubscribers.delete(subscriberId);
321
318
  _this.logInfo('handleBookingList: 已清理订阅者(非今天)', {
@@ -324,7 +321,7 @@ var Server = /*#__PURE__*/function () {
324
321
  });
325
322
  }
326
323
  return _context5.abrupt("return", _this.fetchBookingListFromAPI(queryPayload));
327
- case 13:
324
+ case 12:
328
325
  case "end":
329
326
  return _context5.stop();
330
327
  }
@@ -346,7 +343,6 @@ var Server = /*#__PURE__*/function () {
346
343
  while (1) switch (_context6.prev = _context6.next) {
347
344
  case 0:
348
345
  url = _ref16.url, method = _ref16.method, data = _ref16.data, config = _ref16.config;
349
- console.log('[Server] handleResourceList:', url, method, data, config);
350
346
  list = (_this$resource = _this.resource) === null || _this$resource === void 0 ? void 0 : _this$resource.getResources({
351
347
  skip: (data === null || data === void 0 ? void 0 : data.skip) || 1,
352
348
  num: (data === null || data === void 0 ? void 0 : data.num) || 10
@@ -360,7 +356,7 @@ var Server = /*#__PURE__*/function () {
360
356
  message: '',
361
357
  status: true
362
358
  });
363
- case 4:
359
+ case 3:
364
360
  case "end":
365
361
  return _context6.stop();
366
362
  }
@@ -415,7 +411,6 @@ var Server = /*#__PURE__*/function () {
415
411
  while (1) switch (_context8.prev = _context8.next) {
416
412
  case 0:
417
413
  url = _ref21.url, method = _ref21.method, data = _ref21.data, config = _ref21.config;
418
- console.log('[Server] handleGetScheduleTimePoints:', url, method, data, config);
419
414
  menu_list_ids = data.menu_list_ids;
420
415
  _this.logInfo('handleGetScheduleTimePoints 开始处理', {
421
416
  menuListIdsCount: (_menu_list_ids$length = menu_list_ids === null || menu_list_ids === void 0 ? void 0 : menu_list_ids.length) !== null && _menu_list_ids$length !== void 0 ? _menu_list_ids$length : 0,
@@ -424,7 +419,7 @@ var Server = /*#__PURE__*/function () {
424
419
 
425
420
  // 检查必要的模块是否已注册
426
421
  if (_this.menu) {
427
- _context8.next = 8;
422
+ _context8.next = 7;
428
423
  break;
429
424
  }
430
425
  console.error('[Server] Menu 模块未注册');
@@ -435,9 +430,9 @@ var Server = /*#__PURE__*/function () {
435
430
  data: [],
436
431
  status: false
437
432
  });
438
- case 8:
433
+ case 7:
439
434
  if (_this.schedule) {
440
- _context8.next = 12;
435
+ _context8.next = 11;
441
436
  break;
442
437
  }
443
438
  console.error('[Server] Schedule 模块未注册');
@@ -448,9 +443,9 @@ var Server = /*#__PURE__*/function () {
448
443
  data: [],
449
444
  status: false
450
445
  });
451
- case 12:
446
+ case 11:
452
447
  if (!(!menu_list_ids || !Array.isArray(menu_list_ids) || menu_list_ids.length === 0)) {
453
- _context8.next = 16;
448
+ _context8.next = 15;
454
449
  break;
455
450
  }
456
451
  console.error('[Server] menu_list_ids 参数无效');
@@ -464,11 +459,10 @@ var Server = /*#__PURE__*/function () {
464
459
  data: [],
465
460
  status: false
466
461
  });
467
- case 16:
468
- _context8.prev = 16;
462
+ case 15:
463
+ _context8.prev = 15;
469
464
  // 1. 获取餐牌列表
470
465
  menuList = _this.menu.getMenuByIds(menu_list_ids);
471
- console.log("[Server] \u627E\u5230 ".concat(menuList.length, " \u4E2A\u9910\u724C"));
472
466
  _this.logInfo('handleGetScheduleTimePoints: 获取到餐牌列表', {
473
467
  requestedCount: menu_list_ids.length,
474
468
  foundCount: menuList.length,
@@ -478,12 +472,11 @@ var Server = /*#__PURE__*/function () {
478
472
 
479
473
  // 2. 提取所有的 schedule IDs
480
474
  scheduleIds = extractScheduleIdsFromMenus(menuList);
481
- console.log("[Server] \u63D0\u53D6\u5230 ".concat(scheduleIds.length, " \u4E2A\u65E5\u7A0BID:"), scheduleIds);
482
475
  _this.logInfo('handleGetScheduleTimePoints: 提取到日程 IDs', {
483
476
  scheduleCount: scheduleIds.length
484
477
  });
485
478
  if (!(scheduleIds.length === 0)) {
486
- _context8.next = 26;
479
+ _context8.next = 23;
487
480
  break;
488
481
  }
489
482
  _this.logInfo('handleGetScheduleTimePoints: 没有找到相关日程', {
@@ -495,10 +488,9 @@ var Server = /*#__PURE__*/function () {
495
488
  data: [],
496
489
  status: true
497
490
  });
498
- case 26:
491
+ case 23:
499
492
  // 3. 获取日程详情
500
493
  scheduleList = _this.schedule.getScheduleByIds(scheduleIds);
501
- console.log("[Server] \u627E\u5230 ".concat(scheduleList.length, " \u4E2A\u65E5\u7A0B"));
502
494
  _this.logInfo('handleGetScheduleTimePoints: 获取到日程详情', {
503
495
  requestedCount: scheduleIds.length,
504
496
  foundCount: scheduleList.length
@@ -506,7 +498,6 @@ var Server = /*#__PURE__*/function () {
506
498
 
507
499
  // 4. 提取时间点
508
500
  timePoints = extractTimePointsFromSchedules(scheduleList);
509
- console.log("[Server] \u63D0\u53D6\u5230 ".concat(timePoints.length, " \u4E2A\u65F6\u95F4\u70B9:"), timePoints);
510
501
  _this.logInfo('handleGetScheduleTimePoints 处理完成', {
511
502
  menuListIdsCount: menu_list_ids.length,
512
503
  menuCount: menuList.length,
@@ -519,9 +510,9 @@ var Server = /*#__PURE__*/function () {
519
510
  data: timePoints,
520
511
  status: true
521
512
  });
522
- case 35:
523
- _context8.prev = 35;
524
- _context8.t0 = _context8["catch"](16);
513
+ case 30:
514
+ _context8.prev = 30;
515
+ _context8.t0 = _context8["catch"](15);
525
516
  errorMessage = _context8.t0 instanceof Error ? _context8.t0.message : '未知错误';
526
517
  console.error('[Server] 获取日程时间点失败:', _context8.t0);
527
518
  _this.logError('handleGetScheduleTimePoints: 获取日程时间点失败', {
@@ -534,11 +525,11 @@ var Server = /*#__PURE__*/function () {
534
525
  data: [],
535
526
  status: false
536
527
  });
537
- case 41:
528
+ case 36:
538
529
  case "end":
539
530
  return _context8.stop();
540
531
  }
541
- }, _callee8, null, [[16, 35]]);
532
+ }, _callee8, null, [[15, 30]]);
542
533
  }));
543
534
  return function (_x8) {
544
535
  return _ref22.apply(this, arguments);
@@ -548,7 +539,6 @@ var Server = /*#__PURE__*/function () {
548
539
  var appPlugin = core.getPlugin('app');
549
540
  this.app = (appPlugin === null || appPlugin === void 0 ? void 0 : appPlugin.getApp()) || null;
550
541
  this.logger = ((_this$app = this.app) === null || _this$app === void 0 ? void 0 : _this$app.logger) || null;
551
- console.log('[Server] Server 初始化', this.core);
552
542
  this.logInfo('Server 初始化', {
553
543
  hasApp: !!this.app,
554
544
  hasLogger: !!this.logger
@@ -585,7 +575,6 @@ var Server = /*#__PURE__*/function () {
585
575
  });
586
576
  }
587
577
  _this2.router[method][path] = handler;
588
- console.log("[Server] \uD83D\uDCDD \u6CE8\u518C\u8DEF\u7531: ".concat(method.toUpperCase(), " ").concat(path));
589
578
  _this2.logInfo("\u6CE8\u518C\u8DEF\u7531", {
590
579
  method: method.toUpperCase(),
591
580
  path: path
@@ -616,7 +605,6 @@ var Server = /*#__PURE__*/function () {
616
605
  _context9.next = 3;
617
606
  return this.core.registerModule(module, options);
618
607
  case 3:
619
- console.log("[Server] \u2705 ".concat(moduleName, " \u6A21\u5757\u5DF2\u6CE8\u518C"));
620
608
  this.logInfo("\u6A21\u5757\u6CE8\u518C\u6210\u529F: ".concat(moduleName), {
621
609
  moduleName: moduleName
622
610
  });
@@ -632,7 +620,7 @@ var Server = /*#__PURE__*/function () {
632
620
  });
633
621
  }
634
622
  }
635
- case 6:
623
+ case 5:
636
624
  case "end":
637
625
  return _context9.stop();
638
626
  }
@@ -722,8 +710,6 @@ var Server = /*#__PURE__*/function () {
722
710
  return _regeneratorRuntime().wrap(function _callee11$(_context11) {
723
711
  while (1) switch (_context11.prev = _context11.next) {
724
712
  case 0:
725
- console.log('[Server] 开始注册模块...');
726
-
727
713
  // 如果没有指定模块,则注册所有模块
728
714
  configs = moduleConfigs || Object.keys(this.moduleRegistry);
729
715
  this.logInfo('开始批量注册模块', {
@@ -732,26 +718,26 @@ var Server = /*#__PURE__*/function () {
732
718
  });
733
719
  registeredModules = [];
734
720
  _iterator = _createForOfIteratorHelper(configs);
735
- _context11.prev = 5;
721
+ _context11.prev = 4;
736
722
  _iterator.s();
737
- case 7:
723
+ case 6:
738
724
  if ((_step = _iterator.n()).done) {
739
- _context11.next = 25;
725
+ _context11.next = 24;
740
726
  break;
741
727
  }
742
728
  config = _step.value;
743
729
  configName = typeof config === 'string' ? config : config.name;
744
- _context11.prev = 10;
745
- _context11.next = 13;
730
+ _context11.prev = 9;
731
+ _context11.next = 12;
746
732
  return this.registerModuleByName(config);
747
- case 13:
733
+ case 12:
748
734
  result = _context11.sent;
749
735
  registeredModules.push(result);
750
- _context11.next = 23;
736
+ _context11.next = 22;
751
737
  break;
752
- case 17:
753
- _context11.prev = 17;
754
- _context11.t0 = _context11["catch"](10);
738
+ case 16:
739
+ _context11.prev = 16;
740
+ _context11.t0 = _context11["catch"](9);
755
741
  errorMessage = _context11.t0 instanceof Error ? _context11.t0.message : String(_context11.t0);
756
742
  this.logError("\u6A21\u5757\u6CE8\u518C\u5931\u8D25: ".concat(configName), {
757
743
  moduleName: configName,
@@ -759,22 +745,21 @@ var Server = /*#__PURE__*/function () {
759
745
  });
760
746
  console.error("[Server] \u6A21\u5757\u6CE8\u518C\u5931\u8D25:", _context11.t0);
761
747
  throw _context11.t0;
762
- case 23:
763
- _context11.next = 7;
748
+ case 22:
749
+ _context11.next = 6;
764
750
  break;
765
- case 25:
766
- _context11.next = 30;
751
+ case 24:
752
+ _context11.next = 29;
767
753
  break;
768
- case 27:
769
- _context11.prev = 27;
770
- _context11.t1 = _context11["catch"](5);
754
+ case 26:
755
+ _context11.prev = 26;
756
+ _context11.t1 = _context11["catch"](4);
771
757
  _iterator.e(_context11.t1);
772
- case 30:
773
- _context11.prev = 30;
758
+ case 29:
759
+ _context11.prev = 29;
774
760
  _iterator.f();
775
- return _context11.finish(30);
776
- case 33:
777
- console.log('[Server] ✅ 所有模块注册完成');
761
+ return _context11.finish(29);
762
+ case 32:
778
763
  this.logInfo('所有模块注册完成', {
779
764
  registeredCount: registeredModules.length,
780
765
  moduleNames: registeredModules.map(function (m) {
@@ -783,11 +768,11 @@ var Server = /*#__PURE__*/function () {
783
768
  })
784
769
  });
785
770
  return _context11.abrupt("return", registeredModules);
786
- case 36:
771
+ case 34:
787
772
  case "end":
788
773
  return _context11.stop();
789
774
  }
790
- }, _callee11, this, [[5, 27, 30, 33], [10, 17]]);
775
+ }, _callee11, this, [[4, 26, 29, 32], [9, 16]]);
791
776
  }));
792
777
  function registerModules(_x13) {
793
778
  return _registerModules.apply(this, arguments);
@@ -807,7 +792,6 @@ var Server = /*#__PURE__*/function () {
807
792
  return _regeneratorRuntime().wrap(function _callee12$(_context12) {
808
793
  while (1) switch (_context12.prev = _context12.next) {
809
794
  case 0:
810
- console.log('[Server] 开始预加载模块数据...');
811
795
  modulesToPreload = registeredModules.filter(function (m) {
812
796
  return m.shouldPreload;
813
797
  });
@@ -818,41 +802,39 @@ var Server = /*#__PURE__*/function () {
818
802
  });
819
803
  preloadResults = [];
820
804
  _iterator2 = _createForOfIteratorHelper(registeredModules);
821
- _context12.prev = 5;
805
+ _context12.prev = 4;
822
806
  _iterator2.s();
823
- case 7:
807
+ case 6:
824
808
  if ((_step2 = _iterator2.n()).done) {
825
- _context12.next = 40;
809
+ _context12.next = 36;
826
810
  break;
827
811
  }
828
812
  _step2$value = _step2.value, module = _step2$value.module, config = _step2$value.config, shouldPreload = _step2$value.shouldPreload;
829
813
  if (shouldPreload) {
830
- _context12.next = 13;
814
+ _context12.next = 11;
831
815
  break;
832
816
  }
833
- console.log("[Server] \u23ED\uFE0F \u8DF3\u8FC7 ".concat(config.name, " \u6A21\u5757\u9884\u52A0\u8F7D"));
834
817
  this.logInfo("\u8DF3\u8FC7\u6A21\u5757\u9884\u52A0\u8F7D: ".concat(config.name), {
835
818
  moduleName: config.name,
836
819
  reason: 'shouldPreload=false'
837
820
  });
838
- return _context12.abrupt("continue", 38);
839
- case 13:
821
+ return _context12.abrupt("continue", 34);
822
+ case 11:
840
823
  if (!(typeof module.preload === 'function')) {
841
- _context12.next = 36;
824
+ _context12.next = 33;
842
825
  break;
843
826
  }
844
827
  startTime = Date.now();
845
- _context12.prev = 15;
828
+ _context12.prev = 13;
846
829
  this.logInfo("\u5F00\u59CB\u9884\u52A0\u8F7D\u6A21\u5757: ".concat(config.name), {
847
830
  moduleName: config.name
848
831
  });
849
832
  options === null || options === void 0 || (_options$onModuleLoad = options.onModuleLoad) === null || _options$onModuleLoad === void 0 || _options$onModuleLoad.call(options, config.name);
850
- _context12.next = 20;
833
+ _context12.next = 18;
851
834
  return module.preload();
852
- case 20:
835
+ case 18:
853
836
  options === null || options === void 0 || (_options$onModuleLoad2 = options.onModuleLoadComplete) === null || _options$onModuleLoad2 === void 0 || _options$onModuleLoad2.call(options, config.name);
854
837
  duration = Date.now() - startTime;
855
- console.log("[Server] \u2705 ".concat(config.name, " \u6A21\u5757\u6570\u636E\u5DF2\u9884\u52A0\u8F7D"));
856
838
  this.logInfo("\u6A21\u5757\u9884\u52A0\u8F7D\u6210\u529F: ".concat(config.name), {
857
839
  moduleName: config.name,
858
840
  duration: "".concat(duration, "ms")
@@ -861,11 +843,11 @@ var Server = /*#__PURE__*/function () {
861
843
  name: config.name,
862
844
  success: true
863
845
  });
864
- _context12.next = 34;
846
+ _context12.next = 31;
865
847
  break;
866
- case 27:
867
- _context12.prev = 27;
868
- _context12.t0 = _context12["catch"](15);
848
+ case 24:
849
+ _context12.prev = 24;
850
+ _context12.t0 = _context12["catch"](13);
869
851
  _duration = Date.now() - startTime;
870
852
  errorMessage = _context12.t0 instanceof Error ? _context12.t0.message : String(_context12.t0);
871
853
  console.error("[Server] \u274C ".concat(config.name, " \u6A21\u5757\u9884\u52A0\u8F7D\u5931\u8D25:"), _context12.t0);
@@ -879,45 +861,43 @@ var Server = /*#__PURE__*/function () {
879
861
  success: false,
880
862
  error: errorMessage
881
863
  });
882
- case 34:
883
- _context12.next = 38;
864
+ case 31:
865
+ _context12.next = 34;
884
866
  break;
885
- case 36:
886
- console.log("[Server] \u26A0\uFE0F ".concat(config.name, " \u6A21\u5757\u672A\u5B9E\u73B0 preload() \u65B9\u6CD5"));
867
+ case 33:
887
868
  this.logWarning("\u6A21\u5757\u672A\u5B9E\u73B0 preload \u65B9\u6CD5: ".concat(config.name), {
888
869
  moduleName: config.name
889
870
  });
890
- case 38:
891
- _context12.next = 7;
871
+ case 34:
872
+ _context12.next = 6;
892
873
  break;
893
- case 40:
894
- _context12.next = 45;
874
+ case 36:
875
+ _context12.next = 41;
895
876
  break;
896
- case 42:
897
- _context12.prev = 42;
898
- _context12.t1 = _context12["catch"](5);
877
+ case 38:
878
+ _context12.prev = 38;
879
+ _context12.t1 = _context12["catch"](4);
899
880
  _iterator2.e(_context12.t1);
900
- case 45:
901
- _context12.prev = 45;
881
+ case 41:
882
+ _context12.prev = 41;
902
883
  _iterator2.f();
903
- return _context12.finish(45);
904
- case 48:
884
+ return _context12.finish(41);
885
+ case 44:
905
886
  successCount = preloadResults.filter(function (r) {
906
887
  return r.success;
907
888
  }).length;
908
889
  failCount = preloadResults.filter(function (r) {
909
890
  return !r.success;
910
891
  }).length;
911
- console.log('[Server] ✅ 所有模块数据预加载完成');
912
892
  this.logInfo('所有模块预加载完成', {
913
893
  successCount: successCount,
914
894
  failCount: failCount
915
895
  });
916
- case 52:
896
+ case 47:
917
897
  case "end":
918
898
  return _context12.stop();
919
899
  }
920
- }, _callee12, this, [[5, 42, 45, 48], [15, 27]]);
900
+ }, _callee12, this, [[4, 38, 41, 44], [13, 24]]);
921
901
  }));
922
902
  function preloadModulesData(_x14, _x15) {
923
903
  return _preloadModulesData.apply(this, arguments);
@@ -1124,7 +1104,6 @@ var Server = /*#__PURE__*/function () {
1124
1104
  return _regeneratorRuntime().wrap(function _callee15$(_context15) {
1125
1105
  while (1) switch (_context15.prev = _context15.next) {
1126
1106
  case 0:
1127
- console.log('[Server] 开始清空所有模块的IndexedDB缓存...');
1128
1107
  this.logInfo('开始清空所有模块的 IndexedDB 缓存');
1129
1108
  clearTasks = [];
1130
1109
  moduleNames = []; // 收集所有模块的清空任务
@@ -1153,29 +1132,28 @@ var Server = /*#__PURE__*/function () {
1153
1132
  moduleNames.push('Order');
1154
1133
  }
1155
1134
  if (!(clearTasks.length === 0)) {
1156
- _context15.next = 14;
1135
+ _context15.next = 13;
1157
1136
  break;
1158
1137
  }
1159
1138
  console.warn('[Server] 没有找到已注册的模块,无需清空');
1160
1139
  this.logWarning('没有找到已注册的模块,无需清空 IndexedDB');
1161
1140
  return _context15.abrupt("return");
1162
- case 14:
1141
+ case 13:
1163
1142
  this.logInfo('准备清空模块缓存', {
1164
1143
  moduleNames: moduleNames
1165
1144
  });
1166
- _context15.prev = 15;
1167
- _context15.next = 18;
1145
+ _context15.prev = 14;
1146
+ _context15.next = 17;
1168
1147
  return Promise.all(clearTasks);
1169
- case 18:
1170
- console.log("[Server] \u2705 \u5DF2\u6210\u529F\u6E05\u7A7A\u6240\u6709\u6A21\u5757\u7684IndexedDB\u7F13\u5B58: ".concat(moduleNames.join(', ')));
1148
+ case 17:
1171
1149
  this.logInfo('成功清空所有模块的 IndexedDB 缓存', {
1172
1150
  moduleNames: moduleNames
1173
1151
  });
1174
- _context15.next = 28;
1152
+ _context15.next = 26;
1175
1153
  break;
1176
- case 22:
1177
- _context15.prev = 22;
1178
- _context15.t0 = _context15["catch"](15);
1154
+ case 20:
1155
+ _context15.prev = 20;
1156
+ _context15.t0 = _context15["catch"](14);
1179
1157
  errorMessage = _context15.t0 instanceof Error ? _context15.t0.message : String(_context15.t0);
1180
1158
  console.error('[Server] ❌ 清空IndexedDB缓存时发生错误:', _context15.t0);
1181
1159
  this.logError('清空 IndexedDB 缓存时发生错误', {
@@ -1183,11 +1161,11 @@ var Server = /*#__PURE__*/function () {
1183
1161
  error: errorMessage
1184
1162
  });
1185
1163
  throw _context15.t0;
1186
- case 28:
1164
+ case 26:
1187
1165
  case "end":
1188
1166
  return _context15.stop();
1189
1167
  }
1190
- }, _callee15, this, [[15, 22]]);
1168
+ }, _callee15, this, [[14, 20]]);
1191
1169
  }));
1192
1170
  function clearAllIndexDB() {
1193
1171
  return _clearAllIndexDB.apply(this, arguments);
@@ -1225,7 +1203,6 @@ var Server = /*#__PURE__*/function () {
1225
1203
  key: "hasRoute",
1226
1204
  value: function hasRoute(method, path) {
1227
1205
  var _this$router$method2;
1228
- console.log(method, path, 'method, path');
1229
1206
  return !!((_this$router$method2 = this.router[method]) !== null && _this$router$method2 !== void 0 && _this$router$method2[path]);
1230
1207
  }
1231
1208
 
@@ -1328,7 +1305,6 @@ var Server = /*#__PURE__*/function () {
1328
1305
  }, {
1329
1306
  key: "registerServerRoutes",
1330
1307
  value: function registerServerRoutes() {
1331
- console.log('[Server] 注册 Server 层业务路由...');
1332
1308
  this.registerRoutes([{
1333
1309
  method: 'post',
1334
1310
  path: '/shop/product/query',
@@ -1486,9 +1462,8 @@ var Server = /*#__PURE__*/function () {
1486
1462
  this.logInfo('computeOrderQueryResult: 开始过滤', {
1487
1463
  data: data
1488
1464
  });
1489
- console.log('[Server] computeOrderQueryResult', data);
1490
1465
  if (this.order) {
1491
- _context18.next = 5;
1466
+ _context18.next = 4;
1492
1467
  break;
1493
1468
  }
1494
1469
  this.logError('computeOrderQueryResult: Order 模块未注册');
@@ -1501,7 +1476,7 @@ var Server = /*#__PURE__*/function () {
1501
1476
  },
1502
1477
  status: false
1503
1478
  });
1504
- case 5:
1479
+ case 4:
1505
1480
  rawList = this.order.getOrders();
1506
1481
  this.logInfo('computeOrderQueryResult: 本地订单数量', {
1507
1482
  rawCount: rawList.length
@@ -1521,7 +1496,7 @@ var Server = /*#__PURE__*/function () {
1521
1496
  message: '',
1522
1497
  status: true
1523
1498
  });
1524
- case 10:
1499
+ case 9:
1525
1500
  case "end":
1526
1501
  return _context18.stop();
1527
1502
  }
@@ -1971,7 +1946,6 @@ var Server = /*#__PURE__*/function () {
1971
1946
  value: function filterProductsByMenuConfig(products, activeMenuList) {
1972
1947
  // 如果没有生效的餐牌,返回空数组
1973
1948
  if (!activeMenuList || activeMenuList.length === 0) {
1974
- console.log('[Server] 没有生效的餐牌,返回空数组');
1975
1949
  this.logInfo('filterProductsByMenuConfig: 没有生效的餐牌,返回空数组', {
1976
1950
  productCount: products.length,
1977
1951
  activeMenuCount: 0
@@ -2000,7 +1974,6 @@ var Server = /*#__PURE__*/function () {
2000
1974
 
2001
1975
  // 如果有任何一个餐牌是 product_all,则返回所有商品
2002
1976
  if (config.type === 'product_all') {
2003
- console.log('[Server] 餐牌允许所有商品:', menu.name);
2004
1977
  this.logInfo('filterProductsByMenuConfig: 餐牌允许所有商品', {
2005
1978
  menuId: menu.form_record_id,
2006
1979
  menuName: menu.name,
@@ -2018,7 +1991,6 @@ var Server = /*#__PURE__*/function () {
2018
1991
  productIds.forEach(function (id) {
2019
1992
  return id && allowedProductIds.add(id);
2020
1993
  });
2021
- console.log('[Server] 餐牌允许指定商品 (product_ids):', menu.name, productIds);
2022
1994
  this.logInfo('filterProductsByMenuConfig: 餐牌允许指定商品', {
2023
1995
  menuId: menu.form_record_id,
2024
1996
  menuName: menu.name,
@@ -2035,7 +2007,6 @@ var Server = /*#__PURE__*/function () {
2035
2007
  collectionIds.forEach(function (id) {
2036
2008
  return id && allowedCollectionIds.add(id);
2037
2009
  });
2038
- console.log('[Server] 餐牌允许商品集合 (product_collection):', menu.name, collectionIds);
2039
2010
  this.logInfo('filterProductsByMenuConfig: 餐牌允许商品集合', {
2040
2011
  menuId: menu.form_record_id,
2041
2012
  menuName: menu.name,
@@ -2060,7 +2031,6 @@ var Server = /*#__PURE__*/function () {
2060
2031
 
2061
2032
  // 如果没有收集到任何商品 ID 和集合 ID,返回空数组
2062
2033
  if (allowedProductIds.size === 0 && allowedCollectionIds.size === 0) {
2063
- console.log('[Server] 没有允许的商品和集合');
2064
2034
  this.logWarning('filterProductsByMenuConfig: 没有允许的商品和集合', {
2065
2035
  productCount: products.length,
2066
2036
  activeMenuCount: activeMenuList.length
@@ -2069,8 +2039,6 @@ var Server = /*#__PURE__*/function () {
2069
2039
  }
2070
2040
  var allowedProductIdsArray = Array.from(allowedProductIds);
2071
2041
  var allowedCollectionIdsArray = Array.from(allowedCollectionIds);
2072
- console.log('[Server] 允许的商品 IDs:', allowedProductIdsArray);
2073
- console.log('[Server] 允许的集合 IDs:', allowedCollectionIdsArray);
2074
2042
  this.logInfo('filterProductsByMenuConfig: 收集到的允许规则', {
2075
2043
  allowedProductCount: allowedProductIds.size,
2076
2044
  allowedCollectionCount: allowedCollectionIds.size
@@ -2094,7 +2062,6 @@ var Server = /*#__PURE__*/function () {
2094
2062
  }
2095
2063
  return false;
2096
2064
  });
2097
- console.log('[Server] 过滤结果: 原始 %d 个,过滤后 %d 个', products.length, filteredProducts.length);
2098
2065
  this.logInfo('filterProductsByMenuConfig: 过滤完成', {
2099
2066
  originalCount: products.length,
2100
2067
  filteredCount: filteredProducts.length,