refactor: loginlog

This commit is contained in:
xingyu4j
2022-11-13 15:13:38 +08:00
parent 866247959e
commit 4a692ed28c
8 changed files with 56 additions and 34 deletions

View File

@ -1,8 +1,24 @@
import request from '@/config/axios'
import type { ErrorCodeVO } from './types'
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[]
}
// 查询错误码列表
export const getErrorCodePageApi = (params) => {
export const getErrorCodePageApi = (params: ErrorCodePageReqVO) => {
return request.get({ url: '/system/error-code/page', params })
}
@ -26,6 +42,6 @@ export const deleteErrorCodeApi = (id: number) => {
return request.delete({ url: '/system/error-code/delete?id=' + id })
}
// 导出错误码
export const excelErrorCodeApi = (params) => {
export const excelErrorCodeApi = (params: ErrorCodePageReqVO) => {
return request.download({ url: '/system/error-code/export-excel', params })
}

View File

@ -1,9 +0,0 @@
export type ErrorCodeVO = {
id: number
type: number
applicationName: string
code: number
message: string
memo: string
createTime: string
}

View File

@ -12,11 +12,18 @@ export interface LoginLogVO {
createTime: string
}
export interface LoginLogReqVO extends BasePage {
userIp?: string
username?: string
status?: boolean
createTime?: string[]
}
// 查询登录日志列表
export const getLoginLogPageApi = (params) => {
export const getLoginLogPageApi = (params: LoginLogReqVO) => {
return request.get({ url: '/system/login-log/page', params })
}
// 导出登录日志
export const exportLoginLogApi = (params) => {
export const exportLoginLogApi = (params: LoginLogReqVO) => {
return request.download({ url: '/system/login-log/export', params })
}