@pisell/pisellos 2.2.154 → 2.2.157
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/Order/index.d.ts +1 -1
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts +4 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +36 -0
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +3 -1
- package/lib/modules/Order/index.d.ts +1 -1
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.d.ts +4 -0
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +14 -0
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +1 -0
- package/package.json +1 -1
|
@@ -173,7 +173,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
173
173
|
private logSubmitBackendRejected;
|
|
174
174
|
syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
|
|
175
175
|
createOrder(params: CommitOrderParams['query']): {
|
|
176
|
-
type: "
|
|
176
|
+
type: "appointment_booking" | "virtual";
|
|
177
177
|
platform: string;
|
|
178
178
|
sales_channel: string;
|
|
179
179
|
order_sales_channel: string;
|
|
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
311
311
|
date: string;
|
|
312
312
|
status: string;
|
|
313
313
|
week: string;
|
|
314
|
-
weekNum: 0 |
|
|
314
|
+
weekNum: 0 | 1 | 5 | 4 | 2 | 3 | 6;
|
|
315
315
|
}[]>;
|
|
316
316
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
317
317
|
private getScheduleDataByIds;
|
|
@@ -330,7 +330,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
330
330
|
count: number;
|
|
331
331
|
left: number;
|
|
332
332
|
summaryCount: number;
|
|
333
|
-
status: "
|
|
333
|
+
status: "sold_out" | "lots_of_space" | "filling_up_fast";
|
|
334
334
|
}[];
|
|
335
335
|
/**
|
|
336
336
|
* 找到多个资源的公共可用时间段
|
|
@@ -20,3 +20,7 @@ export declare const searchProduct: (request: RequestPlugin, code: string) => Pr
|
|
|
20
20
|
searchType: string;
|
|
21
21
|
response: any;
|
|
22
22
|
}>;
|
|
23
|
+
export declare const searchOrder: (request: RequestPlugin, code: string) => Promise<{
|
|
24
|
+
searchType: string;
|
|
25
|
+
response: any;
|
|
26
|
+
}>;
|
|
@@ -156,4 +156,40 @@ export var searchProduct = /*#__PURE__*/function () {
|
|
|
156
156
|
return function searchProduct(_x5, _x6) {
|
|
157
157
|
return _ref3.apply(this, arguments);
|
|
158
158
|
};
|
|
159
|
+
}();
|
|
160
|
+
export var searchOrder = /*#__PURE__*/function () {
|
|
161
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(request, code) {
|
|
162
|
+
var res;
|
|
163
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
164
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
165
|
+
case 0:
|
|
166
|
+
_context4.prev = 0;
|
|
167
|
+
_context4.next = 3;
|
|
168
|
+
return request === null || request === void 0 ? void 0 : request.get("/order/sales/".concat(code));
|
|
169
|
+
case 3:
|
|
170
|
+
res = _context4.sent;
|
|
171
|
+
console.log('searchOrder>>>>>>>', res);
|
|
172
|
+
if (!((res === null || res === void 0 ? void 0 : res.code) == 200 && !!(res !== null && res !== void 0 && res.data))) {
|
|
173
|
+
_context4.next = 7;
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
return _context4.abrupt("return", {
|
|
177
|
+
searchType: 'order',
|
|
178
|
+
response: res
|
|
179
|
+
});
|
|
180
|
+
case 7:
|
|
181
|
+
throw new Error('没有找到对应的识别码');
|
|
182
|
+
case 10:
|
|
183
|
+
_context4.prev = 10;
|
|
184
|
+
_context4.t0 = _context4["catch"](0);
|
|
185
|
+
throw _context4.t0;
|
|
186
|
+
case 13:
|
|
187
|
+
case "end":
|
|
188
|
+
return _context4.stop();
|
|
189
|
+
}
|
|
190
|
+
}, _callee4, null, [[0, 10]]);
|
|
191
|
+
}));
|
|
192
|
+
return function searchOrder(_x7, _x8) {
|
|
193
|
+
return _ref4.apply(this, arguments);
|
|
194
|
+
};
|
|
159
195
|
}();
|
|
@@ -159,7 +159,9 @@ export var handleGlobalScan = function handleGlobalScan(request, localSearch) {
|
|
|
159
159
|
if (value.startsWith('WL')) {
|
|
160
160
|
requestList = [searchWallet(request, value)];
|
|
161
161
|
} else {
|
|
162
|
-
requestList = [searchWalletPass(request, value), searchWallet(request, value), searchProduct(request, value)
|
|
162
|
+
requestList = [searchWalletPass(request, value), searchWallet(request, value), searchProduct(request, value)
|
|
163
|
+
// searchOrder(request, value)
|
|
164
|
+
];
|
|
163
165
|
}
|
|
164
166
|
return requestList;
|
|
165
167
|
};
|
|
@@ -173,7 +173,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
173
173
|
private logSubmitBackendRejected;
|
|
174
174
|
syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
|
|
175
175
|
createOrder(params: CommitOrderParams['query']): {
|
|
176
|
-
type: "
|
|
176
|
+
type: "appointment_booking" | "virtual";
|
|
177
177
|
platform: string;
|
|
178
178
|
sales_channel: string;
|
|
179
179
|
order_sales_channel: string;
|
|
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
311
311
|
date: string;
|
|
312
312
|
status: string;
|
|
313
313
|
week: string;
|
|
314
|
-
weekNum: 0 |
|
|
314
|
+
weekNum: 0 | 1 | 5 | 4 | 2 | 3 | 6;
|
|
315
315
|
}[]>;
|
|
316
316
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
317
317
|
private getScheduleDataByIds;
|
|
@@ -330,7 +330,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
330
330
|
count: number;
|
|
331
331
|
left: number;
|
|
332
332
|
summaryCount: number;
|
|
333
|
-
status: "
|
|
333
|
+
status: "sold_out" | "lots_of_space" | "filling_up_fast";
|
|
334
334
|
}[];
|
|
335
335
|
/**
|
|
336
336
|
* 找到多个资源的公共可用时间段
|
|
@@ -20,3 +20,7 @@ export declare const searchProduct: (request: RequestPlugin, code: string) => Pr
|
|
|
20
20
|
searchType: string;
|
|
21
21
|
response: any;
|
|
22
22
|
}>;
|
|
23
|
+
export declare const searchOrder: (request: RequestPlugin, code: string) => Promise<{
|
|
24
|
+
searchType: string;
|
|
25
|
+
response: any;
|
|
26
|
+
}>;
|
|
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// src/solution/BookingTicket/utils/scan/cloudSearch.ts
|
|
20
20
|
var cloudSearch_exports = {};
|
|
21
21
|
__export(cloudSearch_exports, {
|
|
22
|
+
searchOrder: () => searchOrder,
|
|
22
23
|
searchProduct: () => searchProduct,
|
|
23
24
|
searchWallet: () => searchWallet,
|
|
24
25
|
searchWalletPass: () => searchWalletPass
|
|
@@ -109,8 +110,21 @@ var searchProduct = async (request, code) => {
|
|
|
109
110
|
throw error;
|
|
110
111
|
}
|
|
111
112
|
};
|
|
113
|
+
var searchOrder = async (request, code) => {
|
|
114
|
+
try {
|
|
115
|
+
const res = await (request == null ? void 0 : request.get(`/order/sales/${code}`));
|
|
116
|
+
console.log("searchOrder>>>>>>>", res);
|
|
117
|
+
if ((res == null ? void 0 : res.code) == 200 && !!(res == null ? void 0 : res.data)) {
|
|
118
|
+
return { searchType: "order", response: res };
|
|
119
|
+
}
|
|
120
|
+
throw new Error("没有找到对应的识别码");
|
|
121
|
+
} catch (error) {
|
|
122
|
+
throw error;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
112
125
|
// Annotate the CommonJS export names for ESM import in node:
|
|
113
126
|
0 && (module.exports = {
|
|
127
|
+
searchOrder,
|
|
114
128
|
searchProduct,
|
|
115
129
|
searchWallet,
|
|
116
130
|
searchWalletPass
|
|
@@ -112,6 +112,7 @@ var handleGlobalScan = (request, localSearch) => {
|
|
|
112
112
|
(0, import_cloudSearch.searchWalletPass)(request, value),
|
|
113
113
|
(0, import_cloudSearch.searchWallet)(request, value),
|
|
114
114
|
(0, import_cloudSearch.searchProduct)(request, value)
|
|
115
|
+
// searchOrder(request, value)
|
|
115
116
|
];
|
|
116
117
|
}
|
|
117
118
|
return requestList;
|