48 lines
1.2 KiB
TypeScript
Raw Normal View History

2022-11-03 16:55:01 +08:00
import request from '@/config/axios'
2022-11-13 15:13:38 +08:00
export interface ErrorCodeVO {
id: number
type: number
applicationName: string
code: number
message: string
memo: string
createTime: string
}
export interface ErrorCodePageReqVO extends BasePage {
type?: number
applicationName?: string
code?: number
message?: string
createTime?: string[]
}
2022-07-18 19:06:37 +08:00
// 查询错误码列表
2022-11-13 15:13:38 +08:00
export const getErrorCodePageApi = (params: ErrorCodePageReqVO) => {
2022-07-19 22:33:54 +08:00
return request.get({ url: '/system/error-code/page', params })
2022-07-18 19:06:37 +08:00
}
// 查询错误码详情
export const getErrorCodeApi = (id: number) => {
2022-07-19 22:33:54 +08:00
return request.get({ url: '/system/error-code/get?id=' + id })
2022-07-18 19:06:37 +08:00
}
// 新增错误码
2022-07-19 22:33:54 +08:00
export const createErrorCodeApi = (data: ErrorCodeVO) => {
return request.post({ url: '/system/error-code/create', data })
2022-07-18 19:06:37 +08:00
}
// 修改错误码
2022-07-19 22:33:54 +08:00
export const updateErrorCodeApi = (data: ErrorCodeVO) => {
return request.put({ url: '/system/error-code/update', data })
2022-07-18 19:06:37 +08:00
}
// 删除错误码
export const deleteErrorCodeApi = (id: number) => {
2022-07-19 22:33:54 +08:00
return request.delete({ url: '/system/error-code/delete?id=' + id })
2022-07-18 19:06:37 +08:00
}
// 导出错误码
2022-11-13 15:13:38 +08:00
export const excelErrorCodeApi = (params: ErrorCodePageReqVO) => {
2022-07-25 21:03:14 +08:00
return request.download({ url: '/system/error-code/export-excel', params })
2022-07-18 19:06:37 +08:00
}