2023-02-11 00:44:00 +08:00
|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
export interface ApiErrorLogVO {
|
|
|
|
id: number
|
|
|
|
traceId: string
|
|
|
|
userId: number
|
|
|
|
userType: number
|
|
|
|
applicationName: string
|
|
|
|
requestMethod: string
|
|
|
|
requestParams: string
|
|
|
|
requestUrl: string
|
|
|
|
userIp: string
|
|
|
|
userAgent: string
|
|
|
|
exceptionTime: Date
|
|
|
|
exceptionName: string
|
|
|
|
exceptionMessage: string
|
|
|
|
exceptionRootCauseMessage: string
|
|
|
|
exceptionStackTrace: string
|
|
|
|
exceptionClassName: string
|
|
|
|
exceptionFileName: string
|
|
|
|
exceptionMethodName: string
|
|
|
|
exceptionLineNumber: number
|
|
|
|
processUserId: number
|
|
|
|
processStatus: number
|
|
|
|
processTime: Date
|
|
|
|
resultCode: number
|
|
|
|
createTime: Date
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询列表API 访问日志
|
2023-03-22 22:40:56 +08:00
|
|
|
export const getApiErrorLogPage = (params: PageParam) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return request.get({ url: '/infra/api-error-log/page', params })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 更新 API 错误日志的处理状态
|
2023-03-22 22:40:56 +08:00
|
|
|
export const updateApiErrorLogPage = (id: number, processStatus: number) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return request.put({
|
|
|
|
url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 导出API 访问日志
|
2023-03-22 22:40:56 +08:00
|
|
|
export const exportApiErrorLog = (params) => {
|
2023-02-11 00:44:00 +08:00
|
|
|
return request.download({
|
|
|
|
url: '/infra/api-error-log/export-excel',
|
|
|
|
params
|
|
|
|
})
|
|
|
|
}
|