index.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import request from '@/config/axios'
  2. export interface ErrorCodeVO {
  3. id: number
  4. type: number
  5. applicationName: string
  6. code: number
  7. message: string
  8. memo: string
  9. createTime: Date
  10. }
  11. export interface ErrorCodePageReqVO extends PageParam {
  12. type?: number
  13. applicationName?: string
  14. code?: number
  15. message?: string
  16. createTime?: Date[]
  17. }
  18. // 查询错误码列表
  19. export const getErrorCodePageApi = (params: ErrorCodePageReqVO) => {
  20. return request.get({ url: '/system/error-code/page', params })
  21. }
  22. // 查询错误码详情
  23. export const getErrorCodeApi = (id: number) => {
  24. return request.get({ url: '/system/error-code/get?id=' + id })
  25. }
  26. // 新增错误码
  27. export const createErrorCodeApi = (data: ErrorCodeVO) => {
  28. return request.post({ url: '/system/error-code/create', data })
  29. }
  30. // 修改错误码
  31. export const updateErrorCodeApi = (data: ErrorCodeVO) => {
  32. return request.put({ url: '/system/error-code/update', data })
  33. }
  34. // 删除错误码
  35. export const deleteErrorCodeApi = (id: number) => {
  36. return request.delete({ url: '/system/error-code/delete?id=' + id })
  37. }
  38. // 导出错误码
  39. export const excelErrorCodeApi = (params: ErrorCodePageReqVO) => {
  40. return request.download({ url: '/system/error-code/export-excel', params })
  41. }