feat:增加 loginlog 登录日志

This commit is contained in:
YunaiV
2025-04-06 10:23:57 +08:00
parent 99797f6618
commit 1259699632
8 changed files with 313 additions and 9 deletions

View File

@@ -0,0 +1,32 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace SystemLoginLogApi {
/** 登录日志信息 */
export interface SystemLoginLog {
id: number;
logType: number;
traceId: number;
userId: number;
userType: number;
username: string;
result: number;
status: number;
userIp: string;
userAgent: string;
createTime: string;
}
}
/** 查询登录日志列表 */
export function getLoginLogPage(params: PageParam) {
return requestClient.get<PageResult<SystemLoginLogApi.SystemLoginLog>>('/system/login-log/page',
{ params }
);
}
/** 导出登录日志 */
export function exportLoginLog(params: any) {
return requestClient.download('/system/login-log/export-excel', { params });
}