@pisell/pisellos 2.2.121 → 2.2.123
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/modules/Rules/index.js +2 -2
- package/dist/server/index.d.ts +57 -3
- package/dist/server/index.js +735 -190
- package/dist/server/modules/order/index.d.ts +25 -3
- package/dist/server/modules/order/index.js +282 -136
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +1 -1
- package/lib/modules/Rules/index.js +4 -4
- package/lib/server/index.d.ts +57 -3
- package/lib/server/index.js +471 -33
- package/lib/server/modules/order/index.d.ts +25 -3
- package/lib/server/modules/order/index.js +105 -24
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +1 -1
- package/package.json +1 -1
|
@@ -1982,12 +1982,12 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1982
1982
|
return true; // 单独购买时可用
|
|
1983
1983
|
}
|
|
1984
1984
|
if (isBundleItem) {
|
|
1985
|
-
var _flatItem$bundleItem9, _flatItem$bundleItem10, _flatItem$originProdu, _flatItem$
|
|
1985
|
+
var _flatItem$bundleItem9, _flatItem$bundleItem10, _flatItem$originProdu, _flatItem$parentProdu9;
|
|
1986
1986
|
// 套餐中购买时,判断是否为原价
|
|
1987
1987
|
var priceType = (_flatItem$bundleItem9 = flatItem.bundleItem) === null || _flatItem$bundleItem9 === void 0 ? void 0 : _flatItem$bundleItem9.price_type;
|
|
1988
1988
|
var priceTypeExt = (_flatItem$bundleItem10 = flatItem.bundleItem) === null || _flatItem$bundleItem10 === void 0 ? void 0 : _flatItem$bundleItem10.price_type_ext;
|
|
1989
1989
|
// 主商品id
|
|
1990
|
-
var mainProductId = (flatItem === null || flatItem === void 0 || (_flatItem$originProdu = flatItem.originProduct) === null || _flatItem$originProdu === void 0 ? void 0 : _flatItem$originProdu.
|
|
1990
|
+
var mainProductId = (flatItem === null || flatItem === void 0 || (_flatItem$originProdu = flatItem.originProduct) === null || _flatItem$originProdu === void 0 || (_flatItem$originProdu = _flatItem$originProdu._productOrigin) === null || _flatItem$originProdu === void 0 ? void 0 : _flatItem$originProdu.id) || (flatItem === null || flatItem === void 0 || (_flatItem$parentProdu9 = flatItem.parentProduct) === null || _flatItem$parentProdu9 === void 0 ? void 0 : _flatItem$parentProdu9.id) || 0;
|
|
1991
1991
|
// original_price 对应:
|
|
1992
1992
|
// 1. price_type: "markup" && price_type_ext: "product_price"
|
|
1993
1993
|
// markup_price 对应:
|
package/dist/server/index.d.ts
CHANGED
|
@@ -29,6 +29,10 @@ declare class Server {
|
|
|
29
29
|
private productQuerySubscribers;
|
|
30
30
|
private orderQuerySubscribers;
|
|
31
31
|
private bookingQuerySubscribers;
|
|
32
|
+
private bookingRemoteQuerySubscribers;
|
|
33
|
+
private bookingRemoteCache;
|
|
34
|
+
private readonly BOOKING_REMOTE_CACHE_TTL_MS;
|
|
35
|
+
private readonly BOOKING_REMOTE_CACHE_MAX_ENTRIES;
|
|
32
36
|
private floorPlanQuerySubscribers;
|
|
33
37
|
private moduleRegistry;
|
|
34
38
|
constructor(core: PisellCore);
|
|
@@ -176,11 +180,61 @@ declare class Server {
|
|
|
176
180
|
*/
|
|
177
181
|
private handleUnsubscribeOrderQuery;
|
|
178
182
|
/**
|
|
179
|
-
*
|
|
183
|
+
* 从查询值中提取 YYYY-MM-DD 日期串。
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* this.extractQueryDate('2026-04-15 09:58:00') // => '2026-04-15'
|
|
180
187
|
*/
|
|
181
|
-
private
|
|
188
|
+
private extractQueryDate;
|
|
182
189
|
/**
|
|
183
|
-
*
|
|
190
|
+
* 判断时间范围是否「开始和结束都不是今天」。
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* this.isRangeBothNotToday('2026-04-13', '2026-04-14') // => true
|
|
194
|
+
*/
|
|
195
|
+
private isRangeBothNotToday;
|
|
196
|
+
/**
|
|
197
|
+
* 订单查询是否走本地:
|
|
198
|
+
* - 当 start_time 与 end_time 都不是今天时,走远端;
|
|
199
|
+
* - 其余情况走本地。
|
|
200
|
+
*/
|
|
201
|
+
private shouldUseLocalOrderQuery;
|
|
202
|
+
/**
|
|
203
|
+
* 预约查询是否走本地:
|
|
204
|
+
* - 当 sales_time_between 的开始和结束都不是今天时,走远端;
|
|
205
|
+
* - 其余情况走本地。
|
|
206
|
+
*/
|
|
207
|
+
private shouldUseLocalBookingQuery;
|
|
208
|
+
/**
|
|
209
|
+
* 日历 SSE 精简 with:只拉日历渲染必需的关联字段
|
|
210
|
+
*/
|
|
211
|
+
private resolveBookingSalesWith;
|
|
212
|
+
/**
|
|
213
|
+
* 日历 SSE 精简 select:渲染 + filterBookingsFromOrders 所需的主表字段
|
|
214
|
+
* business_code / payment_status 不直接用于渲染,但 matchOrder 过滤依赖
|
|
215
|
+
*/
|
|
216
|
+
private resolveBookingSalesSelect;
|
|
217
|
+
private normalizeBookingRemoteQueryPayload;
|
|
218
|
+
/**
|
|
219
|
+
* 远端预约查询内存缓存开关:默认 false,仅显式 true 才启用。
|
|
220
|
+
*/
|
|
221
|
+
private isBookingRemoteMemoryCacheEnabled;
|
|
222
|
+
private stableSerialize;
|
|
223
|
+
private buildBookingRemoteCacheKey;
|
|
224
|
+
private parseBookingSalesRangeMeta;
|
|
225
|
+
private readBookingRemoteCache;
|
|
226
|
+
private writeBookingRemoteCache;
|
|
227
|
+
private toOrderIdKey;
|
|
228
|
+
private markBookingRemoteCacheAllStale;
|
|
229
|
+
private buildBookingResponse;
|
|
230
|
+
private notifyBookingRemoteSubscribersByCacheKey;
|
|
231
|
+
private syncBookingRemoteCacheFromOrderChanges;
|
|
232
|
+
/**
|
|
233
|
+
* 非本地窗口的订单查询:走真实 API。
|
|
234
|
+
*/
|
|
235
|
+
private fetchOrderListFromAPI;
|
|
236
|
+
/**
|
|
237
|
+
* 非今天的预约查询:通过 SSE 流式拉取订单,再做本地 booking 筛选展开
|
|
184
238
|
*/
|
|
185
239
|
private fetchBookingListFromAPI;
|
|
186
240
|
/**
|