index.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. export interface ApiErrorLogPageReqVO extends PageParam {
  29. userId?: number
  30. userType?: number
  31. applicationName?: string
  32. requestUrl?: string
  33. exceptionTime?: Date[]
  34. processStatus: number
  35. }
  36. export interface ApiErrorLogExportReqVO {
  37. userId?: number
  38. userType?: number
  39. applicationName?: string
  40. requestUrl?: string
  41. exceptionTime?: Date[]
  42. processStatus: number
  43. }
  44. // 查询列表API 访问日志
  45. export const getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => {
  46. return request.get({ url: '/infra/api-error-log/page', params })
  47. }
  48. // 更新 API 错误日志的处理状态
  49. export const updateApiErrorLogPageApi = (id: number, processStatus: number) => {
  50. return request.put({
  51. url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
  52. })
  53. }
  54. // 导出API 访问日志
  55. export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => {
  56. return request.download({
  57. url: '/infra/api-error-log/export-excel',
  58. params
  59. })
  60. }