gaoluyang
9 天以前 86966ec9a83b93decbd93fc8ce2be1882d4c9775
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import type { PageParam, PageResult } from '@vben/request';
 
import { requestClient } from '#/api/request';
 
export namespace InfraApiErrorLogApi {
  /** API 错误日志信息 */
  export interface ApiErrorLog {
    id: number;
    traceId: string;
    userId: number;
    userType: number;
    applicationName: string;
    requestMethod: string;
    requestParams: string;
    requestUrl: string;
    userIp: string;
    userAgent: string;
    exceptionTime: string;
    exceptionName: string;
    exceptionMessage: string;
    exceptionRootCauseMessage: string;
    exceptionStackTrace: string;
    exceptionClassName: string;
    exceptionFileName: string;
    exceptionMethodName: string;
    exceptionLineNumber: number;
    processUserId: number;
    processStatus: number;
    processTime: string;
    resultCode: number;
    createTime: string;
  }
}
 
/** 查询 API 错误日志列表 */
export function getApiErrorLogPage(params: PageParam) {
  return requestClient.get<PageResult<InfraApiErrorLogApi.ApiErrorLog>>(
    '/infra/api-error-log/page',
    { params },
  );
}
 
/** 更新 API 错误日志的处理状态 */
export function updateApiErrorLogStatus(id: number, processStatus: number) {
  return requestClient.put(
    `/infra/api-error-log/update-status?id=${id}&processStatus=${processStatus}`,
  );
}
 
/** 导出 API 错误日志 */
export function exportApiErrorLog(params: any) {
  return requestClient.download('/infra/api-error-log/export-excel', {
    params,
  });
}