@pisell/pisellos 2.3.177 → 2.3.178
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.
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// 导出评估器
|
|
2
|
-
export { PromotionEvaluator } from "./evaluator";
|
|
3
|
-
|
|
4
|
-
// 导出适配器
|
|
5
|
-
export { PromotionAdapter } from "./adapter";
|
|
6
|
-
export { default } from "./adapter";
|
|
7
|
-
|
|
8
|
-
// 导出策略配置示例常量
|
|
9
|
-
export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY, ITEM_REWARD_STRATEGY } from "./examples";
|
|
@@ -3431,8 +3431,8 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3431
3431
|
key: "syncAdditionalOrderFromResource",
|
|
3432
3432
|
value: function () {
|
|
3433
3433
|
var _syncAdditionalOrderFromResource = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(resourceId) {
|
|
3434
|
-
var _ref10, _ref11, _ref12, _this$store$resource5, _this$store$resource6, _occupyDetails$2, _this$store$resource7, _this$otherParams21, _this$store$order8;
|
|
3435
|
-
var tempOrder, normalizedResourceId, _result, occupyDetails, occupyDetail, resourceSelectType, allowAddItems, result;
|
|
3434
|
+
var _ref10, _ref11, _ref12, _this$store$resource5, _this$store$resource6, _occupyDetails$2, _this$store$resource7, _this$otherParams21, _this$store$resource8, _this$store$order8;
|
|
3435
|
+
var tempOrder, normalizedResourceId, _result, occupyDetails, occupyDetail, resourceSelectType, allowAddItems, result, resourceState;
|
|
3436
3436
|
return _regeneratorRuntime().wrap(function _callee43$(_context43) {
|
|
3437
3437
|
while (1) switch (_context43.prev = _context43.next) {
|
|
3438
3438
|
case 0:
|
|
@@ -3481,6 +3481,11 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3481
3481
|
tempOrder.resource_id = normalizedResourceId;
|
|
3482
3482
|
tempOrder.relation_id = toPositiveString(occupyDetail === null || occupyDetail === void 0 ? void 0 : occupyDetail.form_record_id) || normalizedResourceId || tempOrder.relation_id;
|
|
3483
3483
|
tempOrder.table_form_id = toPositiveString(occupyDetail === null || occupyDetail === void 0 ? void 0 : occupyDetail.form_id) || tempOrder.table_form_id;
|
|
3484
|
+
// 冲突后转加餐需同步模式,否则重试仍会携带整单数据走 checkout。
|
|
3485
|
+
resourceState = (_this$store$resource8 = this.store.resource) !== null && _this$store$resource8 !== void 0 ? _this$store$resource8 : this.normalizeResourceState(occupyDetail, resourceSelectType, true);
|
|
3486
|
+
resourceState.mode = 'additional_order';
|
|
3487
|
+
resourceState.order_id = result.order_id;
|
|
3488
|
+
this.store.resource = resourceState;
|
|
3484
3489
|
(_this$store$order8 = this.store.order) === null || _this$store$order8 === void 0 || _this$store$order8.persistTempOrder();
|
|
3485
3490
|
this.logMethodSuccess('syncAdditionalOrderFromResource', _objectSpread(_objectSpread({}, result), {}, {
|
|
3486
3491
|
resourceId: normalizedResourceId,
|
|
@@ -3488,7 +3493,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3488
3493
|
allowAddItems: allowAddItems
|
|
3489
3494
|
}));
|
|
3490
3495
|
return _context43.abrupt("return", result);
|
|
3491
|
-
case
|
|
3496
|
+
case 30:
|
|
3492
3497
|
case "end":
|
|
3493
3498
|
return _context43.stop();
|
|
3494
3499
|
}
|
|
@@ -3503,9 +3508,9 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3503
3508
|
}, {
|
|
3504
3509
|
key: "getReservationResourceSelectType",
|
|
3505
3510
|
value: function getReservationResourceSelectType() {
|
|
3506
|
-
var _this$store$
|
|
3511
|
+
var _this$store$resource9;
|
|
3507
3512
|
this.logMethodStart('getReservationResourceSelectType');
|
|
3508
|
-
var resourceSelectType = (_this$store$
|
|
3513
|
+
var resourceSelectType = (_this$store$resource9 = this.store.resource) === null || _this$store$resource9 === void 0 ? void 0 : _this$store$resource9.resourceSelectType;
|
|
3509
3514
|
var result = _objectSpread(_objectSpread({}, resourceSelectType ? {
|
|
3510
3515
|
resourceSelectType: resourceSelectType
|
|
3511
3516
|
} : {}), {}, {
|
|
@@ -2113,6 +2113,11 @@ class ScanOrderImpl extends _BaseSales.BaseSalesImpl {
|
|
|
2113
2113
|
tempOrder.resource_id = normalizedResourceId;
|
|
2114
2114
|
tempOrder.relation_id = (0, _utils.toPositiveString)(occupyDetail?.form_record_id) || normalizedResourceId || tempOrder.relation_id;
|
|
2115
2115
|
tempOrder.table_form_id = (0, _utils.toPositiveString)(occupyDetail?.form_id) || tempOrder.table_form_id;
|
|
2116
|
+
// 冲突后转加餐需同步模式,否则重试仍会携带整单数据走 checkout。
|
|
2117
|
+
const resourceState = this.store.resource ?? this.normalizeResourceState(occupyDetail, resourceSelectType, true);
|
|
2118
|
+
resourceState.mode = 'additional_order';
|
|
2119
|
+
resourceState.order_id = result.order_id;
|
|
2120
|
+
this.store.resource = resourceState;
|
|
2116
2121
|
this.store.order?.persistTempOrder();
|
|
2117
2122
|
this.logMethodSuccess('syncAdditionalOrderFromResource', {
|
|
2118
2123
|
...result,
|