Blame view

yudao-ui-admin-vue3/src/api/infra/apiErrorLog/index.ts 1.59 KB
3eb11e26   xingyu4j   refactor: refacto...
1
  import request from '@/config/axios'
80a3ae8d   xingyu   feat: add vue3(el...
2
  
fd4bc8cc   xingyu4j   refactor: vxe
3
4
  export interface ApiErrorLogVO {
    id: number
3cfa787e   xingyu   perf: typo
5
6
7
    traceId: string
    userId: number
    userType: number
fd4bc8cc   xingyu4j   refactor: vxe
8
9
10
11
    applicationName: string
    requestMethod: string
    requestParams: string
    requestUrl: string
3cfa787e   xingyu   perf: typo
12
13
14
    userIp: string
    userAgent: string
    exceptionTime: Date
fd4bc8cc   xingyu4j   refactor: vxe
15
    exceptionName: string
3cfa787e   xingyu   perf: typo
16
17
    exceptionMessage: string
    exceptionRootCauseMessage: string
fd4bc8cc   xingyu4j   refactor: vxe
18
    exceptionStackTrace: string
3cfa787e   xingyu   perf: typo
19
20
21
22
23
    exceptionClassName: string
    exceptionFileName: string
    exceptionMethodName: string
    exceptionLineNumber: number
    processUserId: number
fd4bc8cc   xingyu4j   refactor: vxe
24
    processStatus: number
3cfa787e   xingyu   perf: typo
25
    processTime: Date
fd4bc8cc   xingyu4j   refactor: vxe
26
    resultCode: number
3cfa787e   xingyu   perf: typo
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
    createTime: Date
  }
  
  export interface ApiErrorLogPageReqVO extends PageParam {
    userId?: number
    userType?: number
    applicationName?: string
    requestUrl?: string
    exceptionTime?: Date[]
    processStatus: number
  }
  
  export interface ApiErrorLogExportReqVO {
    userId?: number
    userType?: number
    applicationName?: string
    requestUrl?: string
    exceptionTime?: Date[]
    processStatus: number
fd4bc8cc   xingyu4j   refactor: vxe
46
47
  }
  
80a3ae8d   xingyu   feat: add vue3(el...
48
  // 查询列表API 访问日志
3cfa787e   xingyu   perf: typo
49
  export const getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => {
9e2e220b   xingyu   refactor: vue3 ax...
50
    return request.get({ url: '/infra/api-error-log/page', params })
80a3ae8d   xingyu   feat: add vue3(el...
51
52
53
54
  }
  
  // 更新 API 错误日志的处理状态
  export const updateApiErrorLogPageApi = (id: number, processStatus: number) => {
9e2e220b   xingyu   refactor: vue3 ax...
55
    return request.put({
80a3ae8d   xingyu   feat: add vue3(el...
56
57
58
59
60
      url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
    })
  }
  
  // 导出API 访问日志
3cfa787e   xingyu   perf: typo
61
  export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => {
b085f35d   xingyu   feat: vue3 axios ...
62
63
64
65
    return request.download({
      url: '/infra/api-error-log/export-excel',
      params
    })
80a3ae8d   xingyu   feat: add vue3(el...
66
  }