2022-11-03 16:55:01 +08:00
|
|
|
import request from '@/config/axios'
|
2022-07-18 19:06:37 +08:00
|
|
|
|
2022-11-21 15:27:06 +08:00
|
|
|
export interface ApiAccessLogVO {
|
|
|
|
id: number
|
|
|
|
traceId: string
|
2022-11-29 23:23:33 +08:00
|
|
|
userId: number
|
|
|
|
userType: number
|
2022-11-21 15:27:06 +08:00
|
|
|
applicationName: string
|
|
|
|
requestMethod: string
|
|
|
|
requestParams: string
|
|
|
|
requestUrl: string
|
2022-11-29 23:23:33 +08:00
|
|
|
userIp: string
|
|
|
|
userAgent: string
|
|
|
|
beginTime: Date
|
|
|
|
endTIme: Date
|
|
|
|
duration: number
|
2022-11-21 15:27:06 +08:00
|
|
|
resultCode: number
|
2022-11-29 23:23:33 +08:00
|
|
|
resultMsg: string
|
|
|
|
createTime: Date
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ApiAccessLogPageReqVO extends PageParam {
|
|
|
|
userId?: number
|
|
|
|
userType?: number
|
|
|
|
applicationName?: string
|
|
|
|
requestUrl?: string
|
|
|
|
beginTime?: Date[]
|
|
|
|
duration?: number
|
|
|
|
resultCode?: number
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ApiAccessLogExportReqVO {
|
|
|
|
userId?: number
|
|
|
|
userType?: number
|
|
|
|
applicationName?: string
|
|
|
|
requestUrl?: string
|
|
|
|
beginTime?: Date[]
|
|
|
|
duration?: number
|
|
|
|
resultCode?: number
|
2022-11-21 15:27:06 +08:00
|
|
|
}
|
|
|
|
|
2022-07-18 19:06:37 +08:00
|
|
|
// 查询列表API 访问日志
|
2022-11-29 23:23:33 +08:00
|
|
|
export const getApiAccessLogPageApi = (params: ApiAccessLogPageReqVO) => {
|
2022-07-19 22:33:54 +08:00
|
|
|
return request.get({ url: '/infra/api-access-log/page', params })
|
2022-07-18 19:06:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 导出API 访问日志
|
2022-11-29 23:23:33 +08:00
|
|
|
export const exportApiAccessLogApi = (params: ApiAccessLogExportReqVO) => {
|
2022-07-25 21:03:14 +08:00
|
|
|
return request.download({ url: '/infra/api-access-log/export-excel', params })
|
2022-07-18 19:06:37 +08:00
|
|
|
}
|