refactor:基于 lint 处理排版
This commit is contained in:
@@ -2,7 +2,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemAreaApi {
|
||||
/** 地区信息 */
|
||||
export interface SystemArea {
|
||||
export interface Area {
|
||||
id?: number;
|
||||
name: string;
|
||||
code: string;
|
||||
@@ -15,7 +15,7 @@ export namespace SystemAreaApi {
|
||||
|
||||
/** 获得地区树 */
|
||||
export function getAreaTree() {
|
||||
return requestClient.get<SystemAreaApi.SystemArea[]>('/system/area/tree');
|
||||
return requestClient.get<SystemAreaApi.Area[]>('/system/area/tree');
|
||||
}
|
||||
|
||||
/** 获得 IP 对应的地区名 */
|
||||
|
||||
@@ -2,7 +2,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemDeptApi {
|
||||
/** 部门信息 */
|
||||
export interface SystemDept {
|
||||
export interface Dept {
|
||||
id?: number;
|
||||
name: string;
|
||||
parentId?: number;
|
||||
@@ -12,13 +12,13 @@ export namespace SystemDeptApi {
|
||||
phone: string;
|
||||
email: string;
|
||||
createTime: Date;
|
||||
children?: SystemDept[];
|
||||
children?: Dept[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询部门(精简)列表 */
|
||||
export async function getSimpleDeptList() {
|
||||
return requestClient.get<SystemDeptApi.SystemDept[]>('/system/dept/simple-list');
|
||||
return requestClient.get<SystemDeptApi.Dept[]>('/system/dept/simple-list');
|
||||
}
|
||||
|
||||
/** 查询部门列表 */
|
||||
@@ -28,16 +28,16 @@ export async function getDeptList() {
|
||||
|
||||
/** 查询部门详情 */
|
||||
export async function getDept(id: number) {
|
||||
return requestClient.get<SystemDeptApi.SystemDept>(`/system/dept/get?id=${id}`);
|
||||
return requestClient.get<SystemDeptApi.Dept>(`/system/dept/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增部门 */
|
||||
export async function createDept(data: SystemDeptApi.SystemDept) {
|
||||
export async function createDept(data: SystemDeptApi.Dept) {
|
||||
return requestClient.post('/system/dept/create', data);
|
||||
}
|
||||
|
||||
/** 修改部门 */
|
||||
export async function updateDept(data: SystemDeptApi.SystemDept) {
|
||||
export async function updateDept(data: SystemDeptApi.Dept) {
|
||||
return requestClient.put('/system/dept/update', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,17 +2,17 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemDictDataApi {
|
||||
/** 字典数据 */
|
||||
export type SystemDictData = {
|
||||
id?: number;
|
||||
export type DictData = {
|
||||
colorType: string;
|
||||
createTime: Date;
|
||||
cssClass: string;
|
||||
dictType: string;
|
||||
id?: number;
|
||||
label: string;
|
||||
remark: string;
|
||||
sort?: number;
|
||||
status: number;
|
||||
value: string;
|
||||
createTime: Date;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,12 +32,12 @@ export function getDictData(id: number) {
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export function createDictData(data: SystemDictDataApi.SystemDictData) {
|
||||
export function createDictData(data: SystemDictDataApi.DictData) {
|
||||
return requestClient.post('/system/dict-data/create', data);
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export function updateDictData(data: SystemDictDataApi.SystemDictData) {
|
||||
export function updateDictData(data: SystemDictDataApi.DictData) {
|
||||
return requestClient.put('/system/dict-data/update', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemDictTypeApi {
|
||||
/** 字典类型 */
|
||||
export type SystemDictType = {
|
||||
export type DictType = {
|
||||
createTime: Date;
|
||||
id?: number;
|
||||
name: string;
|
||||
remark: string;
|
||||
status: number;
|
||||
type: string;
|
||||
createTime: Date;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -28,12 +28,12 @@ export function getDictType(id: number) {
|
||||
}
|
||||
|
||||
// 新增字典
|
||||
export function createDictType(data: SystemDictTypeApi.SystemDictType) {
|
||||
export function createDictType(data: SystemDictTypeApi.DictType) {
|
||||
return requestClient.post('/system/dict-type/create', data);
|
||||
}
|
||||
|
||||
// 修改字典
|
||||
export function updateDictType(data: SystemDictTypeApi.SystemDictType) {
|
||||
export function updateDictType(data: SystemDictTypeApi.DictType) {
|
||||
return requestClient.put('/system/dict-type/update', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemLoginLogApi {
|
||||
/** 登录日志信息 */
|
||||
export interface SystemLoginLog {
|
||||
export interface LoginLog {
|
||||
id: number;
|
||||
logType: number;
|
||||
traceId: number;
|
||||
@@ -21,8 +21,9 @@ export namespace SystemLoginLogApi {
|
||||
|
||||
/** 查询登录日志列表 */
|
||||
export function getLoginLogPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemLoginLogApi.SystemLoginLog>>('/system/login-log/page',
|
||||
{ params }
|
||||
return requestClient.get<PageResult<SystemLoginLogApi.LoginLog>>(
|
||||
'/system/login-log/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemMailAccountApi {
|
||||
/** 邮箱账号 */
|
||||
export interface SystemMailAccount {
|
||||
export interface MailAccount {
|
||||
id: number;
|
||||
mail: string;
|
||||
username: string;
|
||||
@@ -21,24 +21,26 @@ export namespace SystemMailAccountApi {
|
||||
|
||||
/** 查询邮箱账号列表 */
|
||||
export function getMailAccountPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemMailAccountApi.SystemMailAccount>>(
|
||||
return requestClient.get<PageResult<SystemMailAccountApi.MailAccount>>(
|
||||
'/system/mail-account/page',
|
||||
{ params }
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询邮箱账号详情 */
|
||||
export function getMailAccount(id: number) {
|
||||
return requestClient.get<SystemMailAccountApi.SystemMailAccount>(`/system/mail-account/get?id=${id}`);
|
||||
return requestClient.get<SystemMailAccountApi.MailAccount>(
|
||||
`/system/mail-account/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增邮箱账号 */
|
||||
export function createMailAccount(data: SystemMailAccountApi.SystemMailAccount) {
|
||||
export function createMailAccount(data: SystemMailAccountApi.MailAccount) {
|
||||
return requestClient.post('/system/mail-account/create', data);
|
||||
}
|
||||
|
||||
/** 修改邮箱账号 */
|
||||
export function updateMailAccount(data: SystemMailAccountApi.SystemMailAccount) {
|
||||
export function updateMailAccount(data: SystemMailAccountApi.MailAccount) {
|
||||
return requestClient.put('/system/mail-account/update', data);
|
||||
}
|
||||
|
||||
@@ -49,5 +51,7 @@ export function deleteMailAccount(id: number) {
|
||||
|
||||
/** 获得邮箱账号精简列表 */
|
||||
export function getSimpleMailAccountList() {
|
||||
return requestClient.get<SystemMailAccountApi.SystemMailAccount[]>('/system/mail-account/simple-list');
|
||||
return requestClient.get<SystemMailAccountApi.MailAccount[]>(
|
||||
'/system/mail-account/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemMailLogApi {
|
||||
/** 邮件日志 */
|
||||
export interface SystemMailLog {
|
||||
export interface MailLog {
|
||||
id: number;
|
||||
userId: number;
|
||||
userType: number;
|
||||
@@ -27,15 +27,17 @@ export namespace SystemMailLogApi {
|
||||
|
||||
/** 查询邮件日志列表 */
|
||||
export function getMailLogPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemMailLogApi.SystemMailLog>>(
|
||||
return requestClient.get<PageResult<SystemMailLogApi.MailLog>>(
|
||||
'/system/mail-log/page',
|
||||
{ params }
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询邮件日志详情 */
|
||||
export function getMailLog(id: number) {
|
||||
return requestClient.get<SystemMailLogApi.SystemMailLog>(`/system/mail-log/get?id=${id}`);
|
||||
return requestClient.get<SystemMailLogApi.MailLog>(
|
||||
`/system/mail-log/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 重新发送邮件 */
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemMailTemplateApi {
|
||||
/** 邮件模版信息 */
|
||||
export interface SystemMailTemplate {
|
||||
export interface MailTemplate {
|
||||
id: number;
|
||||
name: string;
|
||||
code: string;
|
||||
@@ -28,24 +28,26 @@ export namespace SystemMailTemplateApi {
|
||||
|
||||
/** 查询邮件模版列表 */
|
||||
export function getMailTemplatePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemMailTemplateApi.SystemMailTemplate>>(
|
||||
return requestClient.get<PageResult<SystemMailTemplateApi.MailTemplate>>(
|
||||
'/system/mail-template/page',
|
||||
{ params }
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询邮件模版详情 */
|
||||
export function getMailTemplate(id: number) {
|
||||
return requestClient.get<SystemMailTemplateApi.SystemMailTemplate>(`/system/mail-template/get?id=${id}`);
|
||||
return requestClient.get<SystemMailTemplateApi.MailTemplate>(
|
||||
`/system/mail-template/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增邮件模版 */
|
||||
export function createMailTemplate(data: SystemMailTemplateApi.SystemMailTemplate) {
|
||||
export function createMailTemplate(data: SystemMailTemplateApi.MailTemplate) {
|
||||
return requestClient.post('/system/mail-template/create', data);
|
||||
}
|
||||
|
||||
/** 修改邮件模版 */
|
||||
export function updateMailTemplate(data: SystemMailTemplateApi.SystemMailTemplate) {
|
||||
export function updateMailTemplate(data: SystemMailTemplateApi.MailTemplate) {
|
||||
return requestClient.put('/system/mail-template/update', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemMenuApi {
|
||||
/** 菜单信息 */
|
||||
export interface SystemMenu {
|
||||
export interface Menu {
|
||||
id: number;
|
||||
name: string;
|
||||
permission: string;
|
||||
@@ -23,26 +23,28 @@ export namespace SystemMenuApi {
|
||||
|
||||
/** 查询菜单(精简)列表 */
|
||||
export async function getSimpleMenusList() {
|
||||
return requestClient.get<SystemMenuApi.SystemMenu[]>('/system/menu/simple-list');
|
||||
return requestClient.get<SystemMenuApi.Menu[]>('/system/menu/simple-list');
|
||||
}
|
||||
|
||||
/** 查询菜单列表 */
|
||||
export async function getMenuList(params?: Record<string, any>) {
|
||||
return requestClient.get<SystemMenuApi.SystemMenu[]>('/system/menu/list', { params });
|
||||
return requestClient.get<SystemMenuApi.Menu[]>('/system/menu/list', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取菜单详情 */
|
||||
export async function getMenu(id: number) {
|
||||
return requestClient.get<SystemMenuApi.SystemMenu>(`/system/menu/get?id=${id}`);
|
||||
return requestClient.get<SystemMenuApi.Menu>(`/system/menu/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增菜单 */
|
||||
export async function createMenu(data: SystemMenuApi.SystemMenu) {
|
||||
export async function createMenu(data: SystemMenuApi.Menu) {
|
||||
return requestClient.post('/system/menu/create', data);
|
||||
}
|
||||
|
||||
/** 修改菜单 */
|
||||
export async function updateMenu(data: SystemMenuApi.SystemMenu) {
|
||||
export async function updateMenu(data: SystemMenuApi.Menu) {
|
||||
return requestClient.put('/system/menu/update', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemNoticeApi {
|
||||
/** 公告信息 */
|
||||
export interface SystemNotice {
|
||||
export interface Notice {
|
||||
id?: number;
|
||||
title: string;
|
||||
type: number;
|
||||
@@ -17,21 +18,26 @@ export namespace SystemNoticeApi {
|
||||
|
||||
/** 查询公告列表 */
|
||||
export function getNoticePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemNoticeApi.SystemNotice>>('/system/notice/page', { params });
|
||||
return requestClient.get<PageResult<SystemNoticeApi.Notice>>(
|
||||
'/system/notice/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询公告详情 */
|
||||
export function getNotice(id: number) {
|
||||
return requestClient.get<SystemNoticeApi.SystemNotice>(`/system/notice/get?id=${id}`);
|
||||
return requestClient.get<SystemNoticeApi.Notice>(
|
||||
`/system/notice/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增公告 */
|
||||
export function createNotice(data: SystemNoticeApi.SystemNotice) {
|
||||
export function createNotice(data: SystemNoticeApi.Notice) {
|
||||
return requestClient.post('/system/notice/create', data);
|
||||
}
|
||||
|
||||
/** 修改公告 */
|
||||
export function updateNotice(data: SystemNoticeApi.SystemNotice) {
|
||||
export function updateNotice(data: SystemNoticeApi.Notice) {
|
||||
return requestClient.put('/system/notice/update', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemNotifyMessageApi {
|
||||
/** 站内信消息信息 */
|
||||
export interface SystemNotifyMessage {
|
||||
export interface NotifyMessage {
|
||||
id: number;
|
||||
userId: number;
|
||||
userType: number;
|
||||
@@ -22,7 +22,7 @@ export namespace SystemNotifyMessageApi {
|
||||
|
||||
/** 查询站内信消息列表 */
|
||||
export function getNotifyMessagePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemNotifyMessageApi.SystemNotifyMessage>>(
|
||||
return requestClient.get<PageResult<SystemNotifyMessageApi.NotifyMessage>>(
|
||||
'/system/notify-message/page',
|
||||
{ params },
|
||||
);
|
||||
@@ -30,7 +30,7 @@ export function getNotifyMessagePage(params: PageParam) {
|
||||
|
||||
/** 获得我的站内信分页 */
|
||||
export function getMyNotifyMessagePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemNotifyMessageApi.SystemNotifyMessage>>(
|
||||
return requestClient.get<PageResult<SystemNotifyMessageApi.NotifyMessage>>(
|
||||
'/system/notify-message/my-page',
|
||||
{ params },
|
||||
);
|
||||
@@ -38,9 +38,13 @@ export function getMyNotifyMessagePage(params: PageParam) {
|
||||
|
||||
/** 批量标记已读 */
|
||||
export function updateNotifyMessageRead(ids: number[]) {
|
||||
return requestClient.put('/system/notify-message/update-read', {}, {
|
||||
params: { ids },
|
||||
});
|
||||
return requestClient.put(
|
||||
'/system/notify-message/update-read',
|
||||
{},
|
||||
{
|
||||
params: { ids },
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 标记所有站内信为已读 */
|
||||
@@ -50,7 +54,9 @@ export function updateAllNotifyMessageRead() {
|
||||
|
||||
/** 获取当前用户的最新站内信列表 */
|
||||
export function getUnreadNotifyMessageList() {
|
||||
return requestClient.get<SystemNotifyMessageApi.SystemNotifyMessage[]>('/system/notify-message/get-unread-list');
|
||||
return requestClient.get<SystemNotifyMessageApi.NotifyMessage[]>(
|
||||
'/system/notify-message/get-unread-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得当前用户的未读站内信数量 */
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemNotifyTemplateApi {
|
||||
/** 站内信模板信息 */
|
||||
export interface SystemNotifyTemplate {
|
||||
export interface NotifyTemplate {
|
||||
id?: number;
|
||||
name: string;
|
||||
nickname: string;
|
||||
@@ -17,8 +17,9 @@ export namespace SystemNotifyTemplateApi {
|
||||
}
|
||||
|
||||
/** 发送站内信请求 */
|
||||
export interface SystemNotifySendReqVO {
|
||||
export interface NotifySendReqVO {
|
||||
userId: number;
|
||||
userType: number;
|
||||
templateCode: string;
|
||||
templateParams: Record<string, any>;
|
||||
}
|
||||
@@ -26,7 +27,7 @@ export namespace SystemNotifyTemplateApi {
|
||||
|
||||
/** 查询站内信模板列表 */
|
||||
export function getNotifyTemplatePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemNotifyTemplateApi.SystemNotifyTemplate>>(
|
||||
return requestClient.get<PageResult<SystemNotifyTemplateApi.NotifyTemplate>>(
|
||||
'/system/notify-template/page',
|
||||
{ params },
|
||||
);
|
||||
@@ -34,16 +35,22 @@ export function getNotifyTemplatePage(params: PageParam) {
|
||||
|
||||
/** 查询站内信模板详情 */
|
||||
export function getNotifyTemplate(id: number) {
|
||||
return requestClient.get<SystemNotifyTemplateApi.SystemNotifyTemplate>(`/system/notify-template/get?id=${id}`);
|
||||
return requestClient.get<SystemNotifyTemplateApi.NotifyTemplate>(
|
||||
`/system/notify-template/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增站内信模板 */
|
||||
export function createNotifyTemplate(data: SystemNotifyTemplateApi.SystemNotifyTemplate) {
|
||||
export function createNotifyTemplate(
|
||||
data: SystemNotifyTemplateApi.NotifyTemplate,
|
||||
) {
|
||||
return requestClient.post('/system/notify-template/create', data);
|
||||
}
|
||||
|
||||
/** 修改站内信模板 */
|
||||
export function updateNotifyTemplate(data: SystemNotifyTemplateApi.SystemNotifyTemplate) {
|
||||
export function updateNotifyTemplate(
|
||||
data: SystemNotifyTemplateApi.NotifyTemplate,
|
||||
) {
|
||||
return requestClient.put('/system/notify-template/update', data);
|
||||
}
|
||||
|
||||
@@ -54,10 +61,12 @@ export function deleteNotifyTemplate(id: number) {
|
||||
|
||||
/** 导出站内信模板 */
|
||||
export function exportNotifyTemplate(params: any) {
|
||||
return requestClient.download('/system/notify-template/export-excel', { params });
|
||||
return requestClient.download('/system/notify-template/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 发送站内信 */
|
||||
export function sendNotify(data: SystemNotifyTemplateApi.SystemNotifySendReqVO) {
|
||||
export function sendNotify(data: SystemNotifyTemplateApi.NotifySendReqVO) {
|
||||
return requestClient.post('/system/notify-template/send-notify', data);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemOAuth2ClientApi {
|
||||
/** OAuth2.0 客户端信息 */
|
||||
export interface SystemOAuth2Client {
|
||||
export interface OAuth2Client {
|
||||
id?: number;
|
||||
clientId: string;
|
||||
secret: string;
|
||||
@@ -27,23 +28,26 @@ export namespace SystemOAuth2ClientApi {
|
||||
|
||||
/** 查询 OAuth2.0 客户端列表 */
|
||||
export function getOAuth2ClientPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemOAuth2ClientApi.SystemOAuth2Client>>('/system/oauth2-client/page',
|
||||
{ params }
|
||||
return requestClient.get<PageResult<SystemOAuth2ClientApi.OAuth2Client>>(
|
||||
'/system/oauth2-client/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询 OAuth2.0 客户端详情 */
|
||||
export function getOAuth2Client(id: number) {
|
||||
return requestClient.get<SystemOAuth2ClientApi.SystemOAuth2Client>(`/system/oauth2-client/get?id=${id}`);
|
||||
return requestClient.get<SystemOAuth2ClientApi.OAuth2Client>(
|
||||
`/system/oauth2-client/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增 OAuth2.0 客户端 */
|
||||
export function createOAuth2Client(data: SystemOAuth2ClientApi.SystemOAuth2Client) {
|
||||
export function createOAuth2Client(data: SystemOAuth2ClientApi.OAuth2Client) {
|
||||
return requestClient.post('/system/oauth2-client/create', data);
|
||||
}
|
||||
|
||||
/** 修改 OAuth2.0 客户端 */
|
||||
export function updateOAuth2Client(data: SystemOAuth2ClientApi.SystemOAuth2Client) {
|
||||
export function updateOAuth2Client(data: SystemOAuth2ClientApi.OAuth2Client) {
|
||||
return requestClient.put('/system/oauth2-client/update', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/** OAuth2.0 授权信息响应 */
|
||||
export interface OAuth2OpenAuthorizeInfoRespVO {
|
||||
client: {
|
||||
name: string;
|
||||
logo: string;
|
||||
};
|
||||
scopes: {
|
||||
key: string;
|
||||
value: boolean;
|
||||
}[];
|
||||
export namespace SystemOAuth2ClientApi {
|
||||
/** 授权信息 */
|
||||
export interface AuthorizeInfoRespVO {
|
||||
client: {
|
||||
logo: string;
|
||||
name: string;
|
||||
};
|
||||
scopes: {
|
||||
key: string;
|
||||
value: boolean;
|
||||
}[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 获得授权信息 */
|
||||
export function getAuthorize(clientId: string) {
|
||||
return requestClient.get<OAuth2OpenAuthorizeInfoRespVO>(`/system/oauth2/authorize?clientId=${clientId}`);
|
||||
return requestClient.get<SystemOAuth2ClientApi.AuthorizeInfoRespVO>(
|
||||
`/system/oauth2/authorize?clientId=${clientId}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 发起授权 */
|
||||
@@ -25,7 +30,7 @@ export function authorize(
|
||||
state: string,
|
||||
autoApprove: boolean,
|
||||
checkedScopes: string[],
|
||||
uncheckedScopes: string[]
|
||||
uncheckedScopes: string[],
|
||||
) {
|
||||
// 构建 scopes
|
||||
const scopes: Record<string, boolean> = {};
|
||||
@@ -35,19 +40,19 @@ export function authorize(
|
||||
for (const scope of uncheckedScopes) {
|
||||
scopes[scope] = false;
|
||||
}
|
||||
|
||||
|
||||
// 发起请求
|
||||
return requestClient.post<string>('/system/oauth2/authorize', null, {
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
params: {
|
||||
response_type: responseType,
|
||||
client_id: clientId,
|
||||
redirect_uri: redirectUri,
|
||||
state: state,
|
||||
state,
|
||||
auto_approve: autoApprove,
|
||||
scope: JSON.stringify(scopes)
|
||||
}
|
||||
scope: JSON.stringify(scopes),
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemOAuth2TokenApi {
|
||||
/** OAuth2.0 令牌信息 */
|
||||
export interface SystemOAuth2Token {
|
||||
export interface OAuth2Token {
|
||||
id?: number;
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
@@ -17,12 +18,17 @@ export namespace SystemOAuth2TokenApi {
|
||||
|
||||
/** 查询 OAuth2.0 令牌列表 */
|
||||
export function getOAuth2TokenPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemOAuth2TokenApi.SystemOAuth2Token>>('/system/oauth2-token/page', {
|
||||
params
|
||||
});
|
||||
return requestClient.get<PageResult<SystemOAuth2TokenApi.OAuth2Token>>(
|
||||
'/system/oauth2-token/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 删除 OAuth2.0 令牌 */
|
||||
export function deleteOAuth2Token(accessToken: string) {
|
||||
return requestClient.delete(`/system/oauth2-token/delete?accessToken=${accessToken}`);
|
||||
return requestClient.delete(
|
||||
`/system/oauth2-token/delete?accessToken=${accessToken}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemOperateLogApi {
|
||||
/** 操作日志信息 */
|
||||
export interface SystemOperateLog {
|
||||
export interface OperateLog {
|
||||
id: number;
|
||||
traceId: string;
|
||||
userType: number;
|
||||
@@ -27,8 +27,9 @@ export namespace SystemOperateLogApi {
|
||||
|
||||
/** 查询操作日志列表 */
|
||||
export function getOperateLogPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemOperateLogApi.SystemOperateLog>>('/system/operate-log/page',
|
||||
{ params }
|
||||
return requestClient.get<PageResult<SystemOperateLogApi.OperateLog>>(
|
||||
'/system/operate-log/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,19 +2,19 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemPermissionApi {
|
||||
/** 分配用户角色请求 */
|
||||
export interface SystemAssignUserRoleReqVO {
|
||||
export interface AssignUserRoleReqVO {
|
||||
userId: number;
|
||||
roleIds: number[];
|
||||
}
|
||||
|
||||
/** 分配角色菜单请求 */
|
||||
export interface SystemAssignRoleMenuReqVO {
|
||||
export interface AssignRoleMenuReqVO {
|
||||
roleId: number;
|
||||
menuIds: number[];
|
||||
}
|
||||
|
||||
/** 分配角色数据权限请求 */
|
||||
export interface SystemAssignRoleDataScopeReqVO {
|
||||
export interface AssignRoleDataScopeReqVO {
|
||||
roleId: number;
|
||||
dataScope: number;
|
||||
dataScopeDeptIds: number[];
|
||||
@@ -30,14 +30,14 @@ export async function getRoleMenuList(roleId: number) {
|
||||
|
||||
/** 赋予角色菜单权限 */
|
||||
export async function assignRoleMenu(
|
||||
data: SystemPermissionApi.SystemAssignRoleMenuReqVO,
|
||||
data: SystemPermissionApi.AssignRoleMenuReqVO,
|
||||
) {
|
||||
return requestClient.post('/system/permission/assign-role-menu', data);
|
||||
}
|
||||
|
||||
/** 赋予角色数据权限 */
|
||||
export async function assignRoleDataScope(
|
||||
data: SystemPermissionApi.SystemAssignRoleDataScopeReqVO,
|
||||
data: SystemPermissionApi.AssignRoleDataScopeReqVO,
|
||||
) {
|
||||
return requestClient.post('/system/permission/assign-role-data-scope', data);
|
||||
}
|
||||
@@ -51,7 +51,7 @@ export async function getUserRoleList(userId: number) {
|
||||
|
||||
/** 赋予用户角色 */
|
||||
export async function assignUserRole(
|
||||
data: SystemPermissionApi.SystemAssignUserRoleReqVO,
|
||||
data: SystemPermissionApi.AssignUserRoleReqVO,
|
||||
) {
|
||||
return requestClient.post('/system/permission/assign-user-role', data);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
import type {PageParam, PageResult} from '@vben/request';
|
||||
|
||||
export namespace SystemPostApi {
|
||||
/** 岗位信息 */
|
||||
export interface SystemPost {
|
||||
export interface Post {
|
||||
id?: number;
|
||||
name: string;
|
||||
code: string;
|
||||
@@ -16,28 +17,31 @@ export namespace SystemPostApi {
|
||||
|
||||
/** 查询岗位列表 */
|
||||
export function getPostPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemPostApi.SystemPost>>('/system/post/page', {
|
||||
params
|
||||
});
|
||||
return requestClient.get<PageResult<SystemPostApi.Post>>(
|
||||
'/system/post/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取岗位精简信息列表 */
|
||||
export function getSimplePostList() {
|
||||
return requestClient.get<SystemPostApi.SystemPost[]>('/system/post/simple-list');
|
||||
return requestClient.get<SystemPostApi.Post[]>('/system/post/simple-list');
|
||||
}
|
||||
|
||||
/** 查询岗位详情 */
|
||||
/** 查询岗位详情 */
|
||||
export function getPost(id: number) {
|
||||
return requestClient.get<SystemPostApi.SystemPost>(`/system/post/get?id=${id}`);
|
||||
return requestClient.get<SystemPostApi.Post>(`/system/post/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增岗位 */
|
||||
export function createPost(data: SystemPostApi.SystemPost) {
|
||||
export function createPost(data: SystemPostApi.Post) {
|
||||
return requestClient.post('/system/post/create', data);
|
||||
}
|
||||
|
||||
/** 修改岗位 */
|
||||
export function updatePost(data: SystemPostApi.SystemPost) {
|
||||
export function updatePost(data: SystemPostApi.Post) {
|
||||
return requestClient.put('/system/post/update', data);
|
||||
}
|
||||
|
||||
@@ -49,6 +53,6 @@ export function deletePost(id: number) {
|
||||
/** 导出岗位 */
|
||||
export function exportPost(params: any) {
|
||||
return requestClient.download('/system/post/export', {
|
||||
params
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemRoleApi {
|
||||
/** 角色信息 */
|
||||
export interface SystemRole {
|
||||
export interface Role {
|
||||
id?: number;
|
||||
name: string;
|
||||
code: string;
|
||||
@@ -18,26 +19,29 @@ export namespace SystemRoleApi {
|
||||
|
||||
/** 查询角色列表 */
|
||||
export function getRolePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemRoleApi.SystemRole>>('/system/role/page', { params });
|
||||
return requestClient.get<PageResult<SystemRoleApi.Role>>(
|
||||
'/system/role/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询角色(精简)列表 */
|
||||
export function getSimpleRoleList() {
|
||||
return requestClient.get<SystemRoleApi.SystemRole[]>('/system/role/simple-list');
|
||||
return requestClient.get<SystemRoleApi.Role[]>('/system/role/simple-list');
|
||||
}
|
||||
|
||||
/** 查询角色详情 */
|
||||
export function getRole(id: number) {
|
||||
return requestClient.get<SystemRoleApi.SystemRole>(`/system/role/get?id=${id}`);
|
||||
return requestClient.get<SystemRoleApi.Role>(`/system/role/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增角色 */
|
||||
export function createRole(data: SystemRoleApi.SystemRole) {
|
||||
export function createRole(data: SystemRoleApi.Role) {
|
||||
return requestClient.post('/system/role/create', data);
|
||||
}
|
||||
|
||||
/** 修改角色 */
|
||||
export function updateRole(data: SystemRoleApi.SystemRole) {
|
||||
export function updateRole(data: SystemRoleApi.Role) {
|
||||
return requestClient.put('/system/role/update', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemSmsChannelApi {
|
||||
/** 短信渠道信息 */
|
||||
export interface SystemSmsChannel {
|
||||
export interface SmsChannel {
|
||||
id?: number;
|
||||
code: string;
|
||||
status: number;
|
||||
@@ -19,7 +19,7 @@ export namespace SystemSmsChannelApi {
|
||||
|
||||
/** 查询短信渠道列表 */
|
||||
export function getSmsChannelPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemSmsChannelApi.SystemSmsChannel>>(
|
||||
return requestClient.get<PageResult<SystemSmsChannelApi.SmsChannel>>(
|
||||
'/system/sms-channel/page',
|
||||
{ params },
|
||||
);
|
||||
@@ -27,21 +27,25 @@ export function getSmsChannelPage(params: PageParam) {
|
||||
|
||||
/** 获得短信渠道精简列表 */
|
||||
export function getSimpleSmsChannelList() {
|
||||
return requestClient.get<SystemSmsChannelApi.SystemSmsChannel[]>('/system/sms-channel/simple-list');
|
||||
return requestClient.get<SystemSmsChannelApi.SmsChannel[]>(
|
||||
'/system/sms-channel/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询短信渠道详情 */
|
||||
export function getSmsChannel(id: number) {
|
||||
return requestClient.get<SystemSmsChannelApi.SystemSmsChannel>(`/system/sms-channel/get?id=${id}`);
|
||||
return requestClient.get<SystemSmsChannelApi.SmsChannel>(
|
||||
`/system/sms-channel/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增短信渠道 */
|
||||
export function createSmsChannel(data: SystemSmsChannelApi.SystemSmsChannel) {
|
||||
export function createSmsChannel(data: SystemSmsChannelApi.SmsChannel) {
|
||||
return requestClient.post('/system/sms-channel/create', data);
|
||||
}
|
||||
|
||||
/** 修改短信渠道 */
|
||||
export function updateSmsChannel(data: SystemSmsChannelApi.SystemSmsChannel) {
|
||||
export function updateSmsChannel(data: SystemSmsChannelApi.SmsChannel) {
|
||||
return requestClient.put('/system/sms-channel/update', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemSmsLogApi {
|
||||
/** 短信日志信息 */
|
||||
export interface SystemSmsLog {
|
||||
export interface SmsLog {
|
||||
id?: number;
|
||||
channelId?: number;
|
||||
channelCode: string;
|
||||
@@ -33,7 +33,10 @@ export namespace SystemSmsLogApi {
|
||||
|
||||
/** 查询短信日志列表 */
|
||||
export function getSmsLogPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemSmsLogApi.SystemSmsLog>>('/system/sms-log/page', { params });
|
||||
return requestClient.get<PageResult<SystemSmsLogApi.SmsLog>>(
|
||||
'/system/sms-log/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 导出短信日志 */
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemSmsTemplateApi {
|
||||
/** 短信模板信息 */
|
||||
export interface SystemSmsTemplate {
|
||||
export interface SmsTemplate {
|
||||
id?: number;
|
||||
type?: number;
|
||||
status: number;
|
||||
@@ -20,7 +20,7 @@ export namespace SystemSmsTemplateApi {
|
||||
}
|
||||
|
||||
/** 发送短信请求 */
|
||||
export interface SystemSmsSendReqVO {
|
||||
export interface SmsSendReqVO {
|
||||
mobile: string;
|
||||
templateCode: string;
|
||||
templateParams: Record<string, any>;
|
||||
@@ -29,7 +29,7 @@ export namespace SystemSmsTemplateApi {
|
||||
|
||||
/** 查询短信模板列表 */
|
||||
export function getSmsTemplatePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemSmsTemplateApi.SystemSmsTemplate>>(
|
||||
return requestClient.get<PageResult<SystemSmsTemplateApi.SmsTemplate>>(
|
||||
'/system/sms-template/page',
|
||||
{ params },
|
||||
);
|
||||
@@ -37,16 +37,18 @@ export function getSmsTemplatePage(params: PageParam) {
|
||||
|
||||
/** 查询短信模板详情 */
|
||||
export function getSmsTemplate(id: number) {
|
||||
return requestClient.get<SystemSmsTemplateApi.SystemSmsTemplate>(`/system/sms-template/get?id=${id}`);
|
||||
return requestClient.get<SystemSmsTemplateApi.SmsTemplate>(
|
||||
`/system/sms-template/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增短信模板 */
|
||||
export function createSmsTemplate(data: SystemSmsTemplateApi.SystemSmsTemplate) {
|
||||
export function createSmsTemplate(data: SystemSmsTemplateApi.SmsTemplate) {
|
||||
return requestClient.post('/system/sms-template/create', data);
|
||||
}
|
||||
|
||||
/** 修改短信模板 */
|
||||
export function updateSmsTemplate(data: SystemSmsTemplateApi.SystemSmsTemplate) {
|
||||
export function updateSmsTemplate(data: SystemSmsTemplateApi.SmsTemplate) {
|
||||
return requestClient.put('/system/sms-template/update', data);
|
||||
}
|
||||
|
||||
@@ -57,10 +59,12 @@ export function deleteSmsTemplate(id: number) {
|
||||
|
||||
/** 导出短信模板 */
|
||||
export function exportSmsTemplate(params: any) {
|
||||
return requestClient.download('/system/sms-template/export-excel', { params });
|
||||
return requestClient.download('/system/sms-template/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 发送短信 */
|
||||
export function sendSms(data: SystemSmsTemplateApi.SystemSmsSendReqVO) {
|
||||
export function sendSms(data: SystemSmsTemplateApi.SmsSendReqVO) {
|
||||
return requestClient.post('/system/sms-template/send-sms', data);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemSocialClientApi {
|
||||
/** 社交客户端信息 */
|
||||
export interface SystemSocialClient {
|
||||
export interface SocialClient {
|
||||
id?: number;
|
||||
name: string;
|
||||
socialType: number;
|
||||
@@ -18,23 +19,26 @@ export namespace SystemSocialClientApi {
|
||||
|
||||
/** 查询社交客户端列表 */
|
||||
export function getSocialClientPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemSocialClientApi.SystemSocialClient>>('/system/social-client/page',
|
||||
{ params }
|
||||
return requestClient.get<PageResult<SystemSocialClientApi.SocialClient>>(
|
||||
'/system/social-client/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询社交客户端详情 */
|
||||
export function getSocialClient(id: number) {
|
||||
return requestClient.get<SystemSocialClientApi.SystemSocialClient>(`/system/social-client/get?id=${id}`);
|
||||
return requestClient.get<SystemSocialClientApi.SocialClient>(
|
||||
`/system/social-client/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增社交客户端 */
|
||||
export function createSocialClient(data: SystemSocialClientApi.SystemSocialClient) {
|
||||
export function createSocialClient(data: SystemSocialClientApi.SocialClient) {
|
||||
return requestClient.post('/system/social-client/create', data);
|
||||
}
|
||||
|
||||
/** 修改社交客户端 */
|
||||
export function updateSocialClient(data: SystemSocialClientApi.SystemSocialClient) {
|
||||
export function updateSocialClient(data: SystemSocialClientApi.SocialClient) {
|
||||
return requestClient.put('/system/social-client/update', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemSocialUserApi {
|
||||
/** 社交用户信息 */
|
||||
export interface SystemSocialUser {
|
||||
export interface SocialUser {
|
||||
id?: number;
|
||||
type: number;
|
||||
openid: string;
|
||||
@@ -35,14 +35,17 @@ export namespace SystemSocialUserApi {
|
||||
|
||||
/** 查询社交用户列表 */
|
||||
export function getSocialUserPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemSocialUserApi.SystemSocialUser>>('/system/social-user/page',
|
||||
{ params }
|
||||
return requestClient.get<PageResult<SystemSocialUserApi.SocialUser>>(
|
||||
'/system/social-user/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询社交用户详情 */
|
||||
export function getSocialUser(id: number) {
|
||||
return requestClient.get<SystemSocialUserApi.SystemSocialUser>(`/system/social-user/get?id=${id}`);
|
||||
return requestClient.get<SystemSocialUserApi.SocialUser>(
|
||||
`/system/social-user/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 社交绑定,使用 code 授权码 */
|
||||
@@ -57,5 +60,7 @@ export function socialUnbind(data: SystemSocialUserApi.SocialUserUnbindReqVO) {
|
||||
|
||||
/** 获得绑定社交用户列表 */
|
||||
export function getBindSocialUserList() {
|
||||
return requestClient.get<SystemSocialUserApi.SystemSocialUser[]>('/system/social-user/get-bind-list');
|
||||
return requestClient.get<SystemSocialUserApi.SocialUser[]>(
|
||||
'/system/social-user/get-bind-list',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemTenantPackageApi {
|
||||
/** 租户套餐信息 */
|
||||
export interface SystemTenantPackage {
|
||||
export interface TenantPackage {
|
||||
id: number;
|
||||
name: string;
|
||||
status: number;
|
||||
@@ -19,9 +19,9 @@ export namespace SystemTenantPackageApi {
|
||||
|
||||
/** 租户套餐列表 */
|
||||
export function getTenantPackagePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemTenantPackageApi.SystemTenantPackage>>(
|
||||
return requestClient.get<PageResult<SystemTenantPackageApi.TenantPackage>>(
|
||||
'/system/tenant-package/page',
|
||||
{ params }
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
@@ -31,12 +31,16 @@ export function getTenantPackage(id: number) {
|
||||
}
|
||||
|
||||
/** 新增租户套餐 */
|
||||
export function createTenantPackage(data: SystemTenantPackageApi.SystemTenantPackage) {
|
||||
export function createTenantPackage(
|
||||
data: SystemTenantPackageApi.TenantPackage,
|
||||
) {
|
||||
return requestClient.post('/system/tenant-package/create', data);
|
||||
}
|
||||
|
||||
/** 修改租户套餐 */
|
||||
export function updateTenantPackage(data: SystemTenantPackageApi.SystemTenantPackage) {
|
||||
export function updateTenantPackage(
|
||||
data: SystemTenantPackageApi.TenantPackage,
|
||||
) {
|
||||
return requestClient.put('/system/tenant-package/update', data);
|
||||
}
|
||||
|
||||
@@ -47,5 +51,7 @@ export function deleteTenantPackage(id: number) {
|
||||
|
||||
/** 获取租户套餐精简信息列表 */
|
||||
export function getTenantPackageList() {
|
||||
return requestClient.get<SystemTenantPackageApi.SystemTenantPackage[]>('/system/tenant-package/get-simple-list');
|
||||
return requestClient.get<SystemTenantPackageApi.TenantPackage[]>(
|
||||
'/system/tenant-package/get-simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemTenantApi {
|
||||
/** 租户信息 */
|
||||
export interface SystemTenant {
|
||||
export interface Tenant {
|
||||
id?: number;
|
||||
name: string;
|
||||
packageId: number;
|
||||
@@ -19,26 +19,33 @@ export namespace SystemTenantApi {
|
||||
|
||||
/** 租户列表 */
|
||||
export function getTenantPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemTenantApi.SystemTenant>>('/system/tenant/page', { params });
|
||||
return requestClient.get<PageResult<SystemTenantApi.Tenant>>(
|
||||
'/system/tenant/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取租户精简信息列表 */
|
||||
export function getSimpleTenantList() {
|
||||
return requestClient.get<SystemTenantApi.SystemTenant[]>('/system/tenant/simple-list');
|
||||
return requestClient.get<SystemTenantApi.Tenant[]>(
|
||||
'/system/tenant/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询租户详情 */
|
||||
export function getTenant(id: number) {
|
||||
return requestClient.get<SystemTenantApi.SystemTenant>(`/system/tenant/get?id=${id}`,);
|
||||
return requestClient.get<SystemTenantApi.Tenant>(
|
||||
`/system/tenant/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增租户 */
|
||||
export function createTenant(data: SystemTenantApi.SystemTenant) {
|
||||
export function createTenant(data: SystemTenantApi.Tenant) {
|
||||
return requestClient.post('/system/tenant/create', data);
|
||||
}
|
||||
|
||||
/** 修改租户 */
|
||||
export function updateTenant(data: SystemTenantApi.SystemTenant) {
|
||||
export function updateTenant(data: SystemTenantApi.Tenant) {
|
||||
return requestClient.put('/system/tenant/update', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type {PageParam, PageResult} from '@vben/request';
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace SystemUserApi {
|
||||
/** 用户信息 */
|
||||
export interface SystemUser {
|
||||
export interface User {
|
||||
id?: number;
|
||||
username: string;
|
||||
nickname: string;
|
||||
@@ -23,21 +23,24 @@ export namespace SystemUserApi {
|
||||
|
||||
/** 查询用户管理列表 */
|
||||
export function getUserPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<SystemUserApi.SystemUser>>('/system/user/page', { params });
|
||||
return requestClient.get<PageResult<SystemUserApi.User>>(
|
||||
'/system/user/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询用户详情 */
|
||||
export function getUser(id: number) {
|
||||
return requestClient.get<SystemUserApi.SystemUser>(`/system/user/get?id=${id}`);
|
||||
return requestClient.get<SystemUserApi.User>(`/system/user/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增用户 */
|
||||
export function createUser(data: SystemUserApi.SystemUser) {
|
||||
export function createUser(data: SystemUserApi.User) {
|
||||
return requestClient.post('/system/user/create', data);
|
||||
}
|
||||
|
||||
/** 修改用户 */
|
||||
export function updateUser(data: SystemUserApi.SystemUser) {
|
||||
export function updateUser(data: SystemUserApi.User) {
|
||||
return requestClient.put('/system/user/update', data);
|
||||
}
|
||||
|
||||
@@ -60,7 +63,7 @@ export function importUserTemplate() {
|
||||
export function importUser(file: File, updateSupport: boolean) {
|
||||
return requestClient.upload('/system/user/import', {
|
||||
file,
|
||||
updateSupport
|
||||
updateSupport,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -76,5 +79,5 @@ export function updateUserStatus(id: number, status: number) {
|
||||
|
||||
/** 获取用户精简信息列表 */
|
||||
export function getSimpleUserList() {
|
||||
return requestClient.get<SystemUserApi.SystemUser[]>('/system/user/simple-list');
|
||||
return requestClient.get<SystemUserApi.User[]>('/system/user/simple-list');
|
||||
}
|
||||
|
||||
@@ -36,15 +36,21 @@ export namespace SystemUserProfileApi {
|
||||
|
||||
/** 获取登录用户信息 */
|
||||
export function getUserProfile() {
|
||||
return requestClient.get<SystemUserProfileApi.UserProfileRespVO>('/system/user/profile/get');
|
||||
return requestClient.get<SystemUserProfileApi.UserProfileRespVO>(
|
||||
'/system/user/profile/get',
|
||||
);
|
||||
}
|
||||
|
||||
/** 修改用户个人信息 */
|
||||
export function updateUserProfile(data: SystemUserProfileApi.UpdateProfileReqVO) {
|
||||
export function updateUserProfile(
|
||||
data: SystemUserProfileApi.UpdateProfileReqVO,
|
||||
) {
|
||||
return requestClient.put('/system/user/profile/update', data);
|
||||
}
|
||||
|
||||
/** 修改用户个人密码 */
|
||||
export function updateUserPassword(data: SystemUserProfileApi.UpdatePasswordReqVO) {
|
||||
export function updateUserPassword(
|
||||
data: SystemUserProfileApi.UpdatePasswordReqVO,
|
||||
) {
|
||||
return requestClient.put('/system/user/profile/update-password', data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user