mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 10:29:19 +08:00
feat: 工作台接入 BI 增量计算健康度(滞后/暂停/空闲)与按店明细恢复
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import type { BiOrderStatIncHealthVO } from './types';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/** BI 增量计算健康度摘要 */
|
||||
export async function getBiOrderStatIncHealthApi() {
|
||||
return requestClient.get<BiOrderStatIncHealthVO.HealthSummary>(
|
||||
'/bi/order-stat/inc/health',
|
||||
);
|
||||
}
|
||||
|
||||
/** BI 增量计算按店明细 */
|
||||
export async function listBiOrderStatIncShopsApi() {
|
||||
return requestClient.get<BiOrderStatIncHealthVO.ShopRow[]>(
|
||||
'/bi/order-stat/inc/shops',
|
||||
);
|
||||
}
|
||||
|
||||
/** 批量恢复暂停店 */
|
||||
export async function resumeBiOrderStatIncPausedApi() {
|
||||
return requestClient.post<BiOrderStatIncHealthVO.ResumePausedResult>(
|
||||
'/bi/order-stat/inc/resume-paused',
|
||||
);
|
||||
}
|
||||
|
||||
/** 恢复单店增量计算 */
|
||||
export async function resumeBiOrderStatIncShopApi(shopId: number) {
|
||||
return requestClient.post(
|
||||
'/bi/order-stat/inc/resume',
|
||||
undefined,
|
||||
{ params: { shopId } },
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from './apis';
|
||||
export type * from './types';
|
||||
@@ -0,0 +1 @@
|
||||
export type * from './types.vo';
|
||||
@@ -0,0 +1,34 @@
|
||||
export namespace BiOrderStatIncHealthVO {
|
||||
export interface HealthSummary {
|
||||
shopCount: number;
|
||||
okCount: number;
|
||||
idleCount: number;
|
||||
laggedCount: number;
|
||||
pausedCount: number;
|
||||
worstLagMinutes?: number;
|
||||
lagThresholdMinutes: number;
|
||||
activityWindowHours: number;
|
||||
healthy: boolean;
|
||||
}
|
||||
|
||||
export interface ShopRow {
|
||||
shopId: number;
|
||||
shopName?: string;
|
||||
platformCode?: string;
|
||||
status?: number;
|
||||
/** OK / IDLE / LAGGED / PAUSED */
|
||||
healthKind: string;
|
||||
lagMinutes?: number;
|
||||
lastSuccessTime?: string;
|
||||
lastStatDate?: string;
|
||||
lastSummary?: string;
|
||||
lastError?: string;
|
||||
recentOrderActivity?: boolean;
|
||||
recentIncSuccess?: boolean;
|
||||
}
|
||||
|
||||
export interface ResumePausedResult {
|
||||
resumedCount: number;
|
||||
shopIds: number[];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user