index.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import request from '@/config/axios'
  2. export interface ApiErrorLogVO {
  3. id: number
  4. traceId: string
  5. userId: number
  6. userType: number
  7. applicationName: string
  8. requestMethod: string
  9. requestParams: string
  10. requestUrl: string
  11. userIp: string
  12. userAgent: string
  13. exceptionTime: Date
  14. exceptionName: string
  15. exceptionMessage: string
  16. exceptionRootCauseMessage: string
  17. exceptionStackTrace: string
  18. exceptionClassName: string
  19. exceptionFileName: string
  20. exceptionMethodName: string
  21. exceptionLineNumber: number
  22. processUserId: number
  23. processStatus: number
  24. processTime: Date
  25. resultCode: number
  26. createTime: Date
  27. }
  28. // 查询列表API 访问日志
  29. export const getApiErrorLogPage = (params: PageParam) => {
  30. return request.get({ url: '/infra/api-error-log/page', params })
  31. }
  32. // 更新 API 错误日志的处理状态
  33. export const updateApiErrorLogPage = (id: number, processStatus: number) => {
  34. return request.put({
  35. url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
  36. })
  37. }
  38. // 导出API 访问日志
  39. export const exportApiErrorLog = (params) => {
  40. return request.download({
  41. url: '/infra/api-error-log/export-excel',
  42. params
  43. })
  44. }