@pisell/pisellos 2.2.260 → 2.2.261
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.
- package/dist/model/strategy/adapter/index.d.ts +0 -4
- package/dist/model/strategy/adapter/index.js +1 -5
- package/dist/model/strategy/adapter/promotion/adapter.d.ts +4 -0
- package/dist/model/strategy/adapter/promotion/adapter.js +23 -0
- package/dist/model/strategy/adapter/promotion/evaluator.d.ts +17 -0
- package/dist/model/strategy/adapter/promotion/evaluator.js +279 -6
- package/dist/model/strategy/adapter/promotion/examples.d.ts +86 -0
- package/dist/model/strategy/adapter/promotion/examples.js +99 -0
- package/dist/model/strategy/adapter/promotion/index.d.ts +1 -1
- package/dist/model/strategy/adapter/promotion/index.js +1 -1
- package/dist/model/strategy/adapter/promotion/type.d.ts +90 -2
- package/dist/model/strategy/adapter/promotion/type.js +45 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +17 -13
- package/dist/modules/Order/index.d.ts +33 -2
- package/dist/modules/Order/index.js +615 -288
- package/dist/modules/Order/types.d.ts +20 -2
- package/dist/modules/Order/utils/bundleDiscountHydration.d.ts +5 -0
- package/dist/modules/Order/utils/bundleDiscountHydration.js +144 -0
- package/dist/modules/Order/utils.d.ts +4 -0
- package/dist/modules/Order/utils.js +116 -29
- package/dist/modules/Product/types.d.ts +0 -22
- package/dist/modules/ProductList/index.d.ts +1 -1
- package/dist/modules/ProductList/index.js +2 -4
- package/dist/modules/ProductList/types.d.ts +0 -2
- package/dist/modules/Rules/index.d.ts +4 -3
- package/dist/modules/Rules/index.js +42 -17
- package/dist/modules/Rules/types.d.ts +2 -1
- package/dist/modules/SalesSummary/index.d.ts +7 -3
- package/dist/modules/SalesSummary/index.js +67 -39
- package/dist/modules/SalesSummary/types.d.ts +1 -0
- package/dist/modules/SalesSummary/utils.js +2 -1
- package/dist/modules/SurchargeList/index.d.ts +6 -4
- package/dist/modules/SurchargeList/index.js +62 -39
- package/dist/modules/SurchargeList/types.d.ts +6 -2
- package/dist/server/index.d.ts +3 -50
- package/dist/server/index.js +1075 -1040
- package/dist/server/modules/order/index.d.ts +22 -3
- package/dist/server/modules/order/index.js +398 -316
- package/dist/server/modules/products/index.d.ts +7 -26
- package/dist/server/modules/products/index.js +76 -166
- package/dist/server/modules/products/types.d.ts +0 -14
- package/dist/solution/BaseSales/index.d.ts +22 -2
- package/dist/solution/BaseSales/index.js +995 -701
- package/dist/solution/BaseSales/types.d.ts +1 -0
- package/dist/solution/BaseSales/types.js +2 -1
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts +3 -1
- package/dist/solution/BaseSales/utils/cartPromotion.js +74 -29
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +6 -3
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +9 -1
- package/dist/solution/BookingTicket/index.js +153 -6
- package/dist/solution/BookingTicket/types.d.ts +0 -2
- package/dist/solution/ScanOrder/index.js +31 -20
- package/dist/solution/VenueBooking/index.js +30 -19
- package/lib/model/strategy/adapter/index.d.ts +0 -4
- package/lib/model/strategy/adapter/index.js +2 -13
- package/lib/model/strategy/adapter/promotion/adapter.d.ts +4 -0
- package/lib/model/strategy/adapter/promotion/adapter.js +20 -0
- package/lib/model/strategy/adapter/promotion/evaluator.d.ts +17 -0
- package/lib/model/strategy/adapter/promotion/evaluator.js +235 -0
- package/lib/model/strategy/adapter/promotion/examples.d.ts +86 -0
- package/lib/model/strategy/adapter/promotion/examples.js +91 -0
- package/lib/model/strategy/adapter/promotion/index.d.ts +1 -1
- package/lib/model/strategy/adapter/promotion/index.js +2 -0
- package/lib/model/strategy/adapter/promotion/type.d.ts +90 -2
- package/lib/model/strategy/adapter/promotion/type.js +2 -0
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +11 -1
- package/lib/modules/Order/index.d.ts +33 -2
- package/lib/modules/Order/index.js +402 -64
- package/lib/modules/Order/types.d.ts +20 -2
- package/lib/modules/Order/utils/bundleDiscountHydration.d.ts +5 -0
- package/lib/modules/Order/utils/bundleDiscountHydration.js +139 -0
- package/lib/modules/Order/utils.d.ts +4 -0
- package/lib/modules/Order/utils.js +90 -3
- package/lib/modules/Product/types.d.ts +0 -22
- package/lib/modules/ProductList/index.d.ts +1 -1
- package/lib/modules/ProductList/index.js +2 -4
- package/lib/modules/ProductList/types.d.ts +0 -2
- package/lib/modules/Rules/index.d.ts +4 -3
- package/lib/modules/Rules/index.js +27 -7
- package/lib/modules/Rules/types.d.ts +2 -1
- package/lib/modules/SalesSummary/index.d.ts +7 -3
- package/lib/modules/SalesSummary/index.js +28 -11
- package/lib/modules/SalesSummary/types.d.ts +1 -0
- package/lib/modules/SalesSummary/utils.js +2 -0
- package/lib/modules/SurchargeList/index.d.ts +6 -4
- package/lib/modules/SurchargeList/index.js +41 -21
- package/lib/modules/SurchargeList/types.d.ts +6 -2
- package/lib/server/index.d.ts +3 -50
- package/lib/server/index.js +244 -215
- package/lib/server/modules/order/index.d.ts +22 -3
- package/lib/server/modules/order/index.js +103 -53
- package/lib/server/modules/products/index.d.ts +7 -26
- package/lib/server/modules/products/index.js +35 -113
- package/lib/server/modules/products/types.d.ts +0 -14
- package/lib/solution/BaseSales/index.d.ts +22 -2
- package/lib/solution/BaseSales/index.js +246 -60
- package/lib/solution/BaseSales/types.d.ts +1 -0
- package/lib/solution/BaseSales/types.js +2 -1
- package/lib/solution/BaseSales/utils/cartPromotion.d.ts +3 -1
- package/lib/solution/BaseSales/utils/cartPromotion.js +59 -16
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +6 -6
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +9 -1
- package/lib/solution/BookingTicket/index.js +101 -0
- package/lib/solution/BookingTicket/types.d.ts +0 -2
- package/lib/solution/ScanOrder/index.js +8 -0
- package/lib/solution/VenueBooking/index.js +8 -0
- package/package.json +1 -1
- package/dist/model/strategy/adapter/dataVariant/adapter.d.ts +0 -49
- package/dist/model/strategy/adapter/dataVariant/adapter.js +0 -152
- package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts +0 -87
- package/dist/model/strategy/adapter/dataVariant/evaluator.js +0 -755
- package/dist/model/strategy/adapter/dataVariant/examples.d.ts +0 -39
- package/dist/model/strategy/adapter/dataVariant/examples.js +0 -282
- package/dist/model/strategy/adapter/dataVariant/index.d.ts +0 -4
- package/dist/model/strategy/adapter/dataVariant/index.js +0 -4
- package/dist/model/strategy/adapter/dataVariant/type.d.ts +0 -146
- package/dist/model/strategy/adapter/dataVariant/type.js +0 -54
- package/lib/model/strategy/adapter/dataVariant/adapter.d.ts +0 -49
- package/lib/model/strategy/adapter/dataVariant/adapter.js +0 -139
- package/lib/model/strategy/adapter/dataVariant/evaluator.d.ts +0 -87
- package/lib/model/strategy/adapter/dataVariant/evaluator.js +0 -564
- package/lib/model/strategy/adapter/dataVariant/examples.d.ts +0 -39
- package/lib/model/strategy/adapter/dataVariant/examples.js +0 -295
- package/lib/model/strategy/adapter/dataVariant/index.d.ts +0 -4
- package/lib/model/strategy/adapter/dataVariant/index.js +0 -38
- package/lib/model/strategy/adapter/dataVariant/type.d.ts +0 -146
- package/lib/model/strategy/adapter/dataVariant/type.js +0 -31
|
@@ -17,6 +17,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
17
17
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
18
|
import { BaseModule } from "../BaseModule";
|
|
19
19
|
export * from "./types";
|
|
20
|
+
var DEFAULT_SURCHARGE_CHANNEL = 'online-store';
|
|
20
21
|
export var SurchargeListModule = /*#__PURE__*/function (_BaseModule) {
|
|
21
22
|
_inherits(SurchargeListModule, _BaseModule);
|
|
22
23
|
var _super = _createSuper(SurchargeListModule);
|
|
@@ -28,14 +29,15 @@ export var SurchargeListModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
28
29
|
_defineProperty(_assertThisInitialized(_this), "defaultVersion", '1.0.0');
|
|
29
30
|
_defineProperty(_assertThisInitialized(_this), "request", void 0);
|
|
30
31
|
_defineProperty(_assertThisInitialized(_this), "store", void 0);
|
|
31
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
32
|
+
_defineProperty(_assertThisInitialized(_this), "loadingPromises", new Map());
|
|
33
|
+
_defineProperty(_assertThisInitialized(_this), "requestVersion", 0);
|
|
32
34
|
return _this;
|
|
33
35
|
}
|
|
34
36
|
_createClass(SurchargeListModule, [{
|
|
35
37
|
key: "initialize",
|
|
36
38
|
value: function () {
|
|
37
39
|
var _initialize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(core, options) {
|
|
38
|
-
var _options$initialState, _options$initialState2, _options$initialState3;
|
|
40
|
+
var _options$initialState, _options$initialState2, _options$initialState3, _options$otherParams, _options$initialState4;
|
|
39
41
|
var hasInitialSurchargeList;
|
|
40
42
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
41
43
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -45,13 +47,14 @@ export var SurchargeListModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
45
47
|
this.request = this.core.getPlugin('request');
|
|
46
48
|
hasInitialSurchargeList = Array.isArray((_options$initialState = options.initialState) === null || _options$initialState === void 0 ? void 0 : _options$initialState.surchargeList);
|
|
47
49
|
this.store.surchargeList = hasInitialSurchargeList ? (_options$initialState2 = options.initialState) === null || _options$initialState2 === void 0 ? void 0 : _options$initialState2.surchargeList : [];
|
|
48
|
-
this.store.
|
|
50
|
+
this.store.channel = ((_options$initialState3 = options.initialState) === null || _options$initialState3 === void 0 ? void 0 : _options$initialState3.channel) || ((_options$otherParams = options.otherParams) === null || _options$otherParams === void 0 ? void 0 : _options$otherParams.channel) || DEFAULT_SURCHARGE_CHANNEL;
|
|
51
|
+
this.store.isLoaded = Boolean((_options$initialState4 = options.initialState) === null || _options$initialState4 === void 0 ? void 0 : _options$initialState4.isLoaded) || hasInitialSurchargeList;
|
|
49
52
|
if (this.request) {
|
|
50
|
-
_context.next =
|
|
53
|
+
_context.next = 9;
|
|
51
54
|
break;
|
|
52
55
|
}
|
|
53
56
|
throw new Error('SurchargeListModule 需要 request 插件支持');
|
|
54
|
-
case
|
|
57
|
+
case 9:
|
|
55
58
|
case "end":
|
|
56
59
|
return _context.stop();
|
|
57
60
|
}
|
|
@@ -62,34 +65,43 @@ export var SurchargeListModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
62
65
|
}
|
|
63
66
|
return initialize;
|
|
64
67
|
}()
|
|
68
|
+
}, {
|
|
69
|
+
key: "resolveChannel",
|
|
70
|
+
value: function resolveChannel(query) {
|
|
71
|
+
return (query === null || query === void 0 ? void 0 : query.channel) || DEFAULT_SURCHARGE_CHANNEL;
|
|
72
|
+
}
|
|
65
73
|
}, {
|
|
66
74
|
key: "getSurchargeList",
|
|
67
75
|
value: function () {
|
|
68
|
-
var _getSurchargeList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
76
|
+
var _getSurchargeList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(query) {
|
|
77
|
+
var channel, loadingPromise, nextPromise;
|
|
69
78
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
70
79
|
while (1) switch (_context2.prev = _context2.next) {
|
|
71
80
|
case 0:
|
|
72
|
-
|
|
73
|
-
|
|
81
|
+
channel = this.resolveChannel(query);
|
|
82
|
+
if (!(this.store.isLoaded && this.store.channel === channel)) {
|
|
83
|
+
_context2.next = 3;
|
|
74
84
|
break;
|
|
75
85
|
}
|
|
76
86
|
return _context2.abrupt("return", this.store.surchargeList);
|
|
77
|
-
case
|
|
78
|
-
|
|
79
|
-
|
|
87
|
+
case 3:
|
|
88
|
+
loadingPromise = this.loadingPromises.get(channel);
|
|
89
|
+
if (!loadingPromise) {
|
|
90
|
+
_context2.next = 6;
|
|
80
91
|
break;
|
|
81
92
|
}
|
|
82
|
-
return _context2.abrupt("return",
|
|
83
|
-
case 4:
|
|
84
|
-
this.loadingPromise = this.loadSurchargeList();
|
|
85
|
-
return _context2.abrupt("return", this.loadingPromise);
|
|
93
|
+
return _context2.abrupt("return", loadingPromise);
|
|
86
94
|
case 6:
|
|
95
|
+
nextPromise = this.loadSurchargeList(channel);
|
|
96
|
+
this.loadingPromises.set(channel, nextPromise);
|
|
97
|
+
return _context2.abrupt("return", nextPromise);
|
|
98
|
+
case 9:
|
|
87
99
|
case "end":
|
|
88
100
|
return _context2.stop();
|
|
89
101
|
}
|
|
90
102
|
}, _callee2, this);
|
|
91
103
|
}));
|
|
92
|
-
function getSurchargeList() {
|
|
104
|
+
function getSurchargeList(_x3) {
|
|
93
105
|
return _getSurchargeList.apply(this, arguments);
|
|
94
106
|
}
|
|
95
107
|
return getSurchargeList;
|
|
@@ -97,19 +109,22 @@ export var SurchargeListModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
97
109
|
}, {
|
|
98
110
|
key: "refreshSurchargeList",
|
|
99
111
|
value: function () {
|
|
100
|
-
var _refreshSurchargeList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
112
|
+
var _refreshSurchargeList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(query) {
|
|
113
|
+
var channel, nextPromise;
|
|
101
114
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
102
115
|
while (1) switch (_context3.prev = _context3.next) {
|
|
103
116
|
case 0:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
117
|
+
channel = this.resolveChannel(query);
|
|
118
|
+
nextPromise = this.loadSurchargeList(channel);
|
|
119
|
+
this.loadingPromises.set(channel, nextPromise);
|
|
120
|
+
return _context3.abrupt("return", nextPromise);
|
|
121
|
+
case 4:
|
|
107
122
|
case "end":
|
|
108
123
|
return _context3.stop();
|
|
109
124
|
}
|
|
110
125
|
}, _callee3, this);
|
|
111
126
|
}));
|
|
112
|
-
function refreshSurchargeList() {
|
|
127
|
+
function refreshSurchargeList(_x4) {
|
|
113
128
|
return _refreshSurchargeList.apply(this, arguments);
|
|
114
129
|
}
|
|
115
130
|
return refreshSurchargeList;
|
|
@@ -117,42 +132,50 @@ export var SurchargeListModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
117
132
|
}, {
|
|
118
133
|
key: "loadSurchargeList",
|
|
119
134
|
value: function () {
|
|
120
|
-
var _loadSurchargeList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
121
|
-
var surchargeList;
|
|
135
|
+
var _loadSurchargeList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(channel) {
|
|
136
|
+
var currentRequestVersion, surchargeList, nextSurchargeList;
|
|
122
137
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
123
138
|
while (1) switch (_context4.prev = _context4.next) {
|
|
124
139
|
case 0:
|
|
125
|
-
|
|
126
|
-
_context4.
|
|
140
|
+
currentRequestVersion = ++this.requestVersion;
|
|
141
|
+
_context4.prev = 1;
|
|
142
|
+
_context4.next = 4;
|
|
127
143
|
return this.request.get('/order/custom-surcharge/available/v2', {
|
|
128
|
-
channel:
|
|
144
|
+
channel: channel,
|
|
129
145
|
is_assemble_product_data: 1,
|
|
130
146
|
is_assemble_schedule_data: 1,
|
|
131
147
|
with: ['relationSchedule']
|
|
132
148
|
});
|
|
133
|
-
case
|
|
149
|
+
case 4:
|
|
134
150
|
surchargeList = _context4.sent;
|
|
135
|
-
|
|
136
|
-
this.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
151
|
+
nextSurchargeList = (surchargeList === null || surchargeList === void 0 ? void 0 : surchargeList.data) || [];
|
|
152
|
+
if (currentRequestVersion === this.requestVersion) {
|
|
153
|
+
this.store.surchargeList = nextSurchargeList;
|
|
154
|
+
this.store.channel = channel;
|
|
155
|
+
this.store.isLoaded = true;
|
|
156
|
+
}
|
|
157
|
+
return _context4.abrupt("return", nextSurchargeList);
|
|
158
|
+
case 10:
|
|
159
|
+
_context4.prev = 10;
|
|
160
|
+
_context4.t0 = _context4["catch"](1);
|
|
141
161
|
console.warn('[SurchargeListModule] 加载附加费配置失败', _context4.t0);
|
|
142
|
-
this.
|
|
143
|
-
|
|
144
|
-
|
|
162
|
+
if (currentRequestVersion === this.requestVersion) {
|
|
163
|
+
this.store.surchargeList = [];
|
|
164
|
+
this.store.channel = channel;
|
|
165
|
+
this.store.isLoaded = true;
|
|
166
|
+
}
|
|
167
|
+
return _context4.abrupt("return", []);
|
|
145
168
|
case 15:
|
|
146
169
|
_context4.prev = 15;
|
|
147
|
-
this.
|
|
170
|
+
this.loadingPromises.delete(channel);
|
|
148
171
|
return _context4.finish(15);
|
|
149
172
|
case 18:
|
|
150
173
|
case "end":
|
|
151
174
|
return _context4.stop();
|
|
152
175
|
}
|
|
153
|
-
}, _callee4, this, [[
|
|
176
|
+
}, _callee4, this, [[1, 10, 15, 18]]);
|
|
154
177
|
}));
|
|
155
|
-
function loadSurchargeList() {
|
|
178
|
+
function loadSurchargeList(_x5) {
|
|
156
179
|
return _loadSurchargeList.apply(this, arguments);
|
|
157
180
|
}
|
|
158
181
|
return loadSurchargeList;
|
|
@@ -4,8 +4,12 @@ export interface SurchargeListItem {
|
|
|
4
4
|
export interface SurchargeListState {
|
|
5
5
|
surchargeList: SurchargeListItem[];
|
|
6
6
|
isLoaded: boolean;
|
|
7
|
+
channel?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SurchargeListQuery {
|
|
10
|
+
channel?: string;
|
|
7
11
|
}
|
|
8
12
|
export interface SurchargeListModuleAPI {
|
|
9
|
-
getSurchargeList(): Promise<SurchargeListItem[]>;
|
|
10
|
-
refreshSurchargeList(): Promise<SurchargeListItem[]>;
|
|
13
|
+
getSurchargeList(query?: SurchargeListQuery): Promise<SurchargeListItem[]>;
|
|
14
|
+
refreshSurchargeList(query?: SurchargeListQuery): Promise<SurchargeListItem[]>;
|
|
11
15
|
}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -47,8 +47,6 @@ declare class Server {
|
|
|
47
47
|
private prefixRouterGet;
|
|
48
48
|
router: Router;
|
|
49
49
|
private productQuerySubscribers;
|
|
50
|
-
/** subscriberId → 智能定价变价时间点定时器句柄(与 subscriber 分离存储,便于 clear) */
|
|
51
|
-
private productQueryScheduleTimers;
|
|
52
50
|
private orderQuerySubscribers;
|
|
53
51
|
private bookingQuerySubscribers;
|
|
54
52
|
private bookingRemoteQuerySubscribers;
|
|
@@ -212,48 +210,6 @@ declare class Server {
|
|
|
212
210
|
* 根据 subscriberId 移除商品查询订阅者
|
|
213
211
|
*/
|
|
214
212
|
removeProductQuerySubscriber(subscriberId?: string): void;
|
|
215
|
-
/**
|
|
216
|
-
* 构建商品 query 响应 data 段,附带智能定价 schedule_time_points 元数据。
|
|
217
|
-
*/
|
|
218
|
-
private buildProductQueryResultPayload;
|
|
219
|
-
/**
|
|
220
|
-
* 是否启用商品 query 订阅的 schedule 时间点定时重算。
|
|
221
|
-
* strategy_context.enable_schedule_reload === false 时关闭。
|
|
222
|
-
*/
|
|
223
|
-
private shouldScheduleProductQueryReload;
|
|
224
|
-
/**
|
|
225
|
-
* 清除指定 subscriber 的全部 schedule 定时器,防止重复 query 或 unsubscribe 后泄漏。
|
|
226
|
-
*/
|
|
227
|
-
private clearSubscriberScheduleTimers;
|
|
228
|
-
/**
|
|
229
|
-
* 从 productQueryScheduleTimers 移除已触发的 timer 引用。
|
|
230
|
-
*/
|
|
231
|
-
private removeScheduleTimerRef;
|
|
232
|
-
/**
|
|
233
|
-
* 计算 schedule 变价时间点到当前时刻的延迟(ms)。已过期返回 -1。
|
|
234
|
-
*/
|
|
235
|
-
private computeScheduleTimePointDelayMs;
|
|
236
|
-
/**
|
|
237
|
-
* 定时重算前刷新 subscriber schedule 上下文:使用执行瞬间时间,禁止沿用首次 query 的 schedule_datetime。
|
|
238
|
-
*/
|
|
239
|
-
private refreshSubscriberScheduleAtExecution;
|
|
240
|
-
/**
|
|
241
|
-
* 为 subscriber 注册智能定价 scheduleTimePoints 定时重算。
|
|
242
|
-
* 必须先 clearSubscriberScheduleTimers,再调用本方法。
|
|
243
|
-
*/
|
|
244
|
-
private scheduleSubscriberTimePointReloads;
|
|
245
|
-
/**
|
|
246
|
-
* schedule 变价时间点定时器触发:刷新 schedule_datetime 后重算并 callback。
|
|
247
|
-
*/
|
|
248
|
-
private onScheduleTimePointTimerFire;
|
|
249
|
-
/**
|
|
250
|
-
* 对单个商品 query 订阅者重算并推送(定时路径;不新建 schedule timer)。
|
|
251
|
-
*/
|
|
252
|
-
private recomputeAndNotifySubscriber;
|
|
253
|
-
/**
|
|
254
|
-
* query 完成后为 subscriber 同步 schedule 定时器(先 clear 再 schedule)。
|
|
255
|
-
*/
|
|
256
|
-
private syncProductQueryScheduleTimers;
|
|
257
213
|
/**
|
|
258
214
|
* 处理商品查询请求
|
|
259
215
|
* 存储订阅者信息,便于数据变更时推送最新结果
|
|
@@ -475,6 +431,9 @@ declare class Server {
|
|
|
475
431
|
private shouldLookupLocalPrintOrder;
|
|
476
432
|
private getLocalPrintOrderLookup;
|
|
477
433
|
private handleLocalPrintOrder;
|
|
434
|
+
private handleMachinecodeBatchMeta;
|
|
435
|
+
private resolveMachinecodeBatchMetadataLookup;
|
|
436
|
+
private syncMachinecodeRedeemStatusToLocalOrder;
|
|
478
437
|
private handleOrderCheckoutSubmit;
|
|
479
438
|
private handleSyncCheckoutSubmit;
|
|
480
439
|
private handlePendingSyncCheckoutOrder;
|
|
@@ -606,12 +565,6 @@ declare class Server {
|
|
|
606
565
|
* @param options.changedIds 变更的商品 IDs,用于增量更新价格缓存
|
|
607
566
|
*/
|
|
608
567
|
private computeProductQueryResult;
|
|
609
|
-
/**
|
|
610
|
-
* 构建商品格式化上下文。
|
|
611
|
-
*
|
|
612
|
-
* 智能定价条件使用全量 menuList/scheduleList;Product Query 顶层参数只保留筛选商品集合所需字段。
|
|
613
|
-
*/
|
|
614
|
-
private buildProductFormatterContext;
|
|
615
568
|
/**
|
|
616
569
|
* 数据变更后,遍历所有订阅者重新计算查询结果并通过 callback 推送
|
|
617
570
|
* 由 ProductsModule 的 onProductsSyncCompleted 事件触发
|