订单详情
This commit is contained in:
@@ -84,6 +84,8 @@ npm run messages
|
||||
npm run orders
|
||||
```
|
||||
|
||||
说明:会同时抓取订单列表与订单详情。
|
||||
|
||||
订单增量:
|
||||
|
||||
```powershell
|
||||
|
||||
@@ -92,6 +92,11 @@ npm run bills -- --resume
|
||||
npm run orders
|
||||
```
|
||||
|
||||
说明:该命令会同时抓取:
|
||||
|
||||
- orders(订单列表)
|
||||
- orderDetails(订单详情)
|
||||
|
||||
订单增量:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -553,6 +553,9 @@ export async function syncOrdersOnly(options = {}) {
|
||||
const summary = { startedAt: new Date().toISOString(), datasets: {} };
|
||||
page = await resolveActivePage(context, '/detail/order/~/costCenter/order');
|
||||
summary.datasets.orders = await syncOrders(page, options);
|
||||
const latestOrders = loadCurrentState('orders', datasets.orders.uniqueKey);
|
||||
const orderIdsForDetail = collectValidOrderIds(latestOrders.records || []);
|
||||
summary.datasets.orderDetails = await syncOrderDetails(page, orderIdsForDetail);
|
||||
summary.finishedAt = new Date().toISOString();
|
||||
|
||||
const stamp = nowStamp();
|
||||
|
||||
Reference in New Issue
Block a user