You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
1.5 KiB
81 lines
1.5 KiB
8 months ago
|
import { systemServer } from '../../index'
|
||
|
|
||
|
|
||
|
export interface TenantVO {
|
||
|
id: number
|
||
|
name: string
|
||
|
contactName: string
|
||
|
contactMobile: string
|
||
|
status: number
|
||
|
domain: string
|
||
|
packageId: number
|
||
|
username: string
|
||
|
password: string
|
||
|
expireTime: Date
|
||
|
accountCount: number
|
||
|
createTime: Date
|
||
|
}
|
||
|
|
||
|
export interface TenantPageReqVO extends PageParam {
|
||
|
name?: string
|
||
|
contactName?: string
|
||
|
contactMobile?: string
|
||
|
status?: number
|
||
|
createTime?: Date[]
|
||
|
}
|
||
|
|
||
|
export interface TenantExportReqVO {
|
||
|
name?: string
|
||
|
contactName?: string
|
||
|
contactMobile?: string
|
||
|
status?: number
|
||
|
createTime?: Date[]
|
||
|
}
|
||
|
|
||
|
// 查询租户列表
|
||
|
export const getTenantPage = (params: TenantPageReqVO) =>
|
||
|
systemServer({
|
||
|
url: '/tenant/page',
|
||
|
method: 'get',
|
||
|
params,
|
||
|
})
|
||
|
|
||
|
// 查询租户详情
|
||
|
export const getTenant = (id: number) =>
|
||
|
systemServer({
|
||
|
url: '/tenant/get?id=' + id,
|
||
|
method: 'get',
|
||
|
})
|
||
|
|
||
|
// 新增租户
|
||
|
export const createTenant = (data: TenantVO) =>
|
||
|
systemServer({
|
||
|
url: '/tenant/create',
|
||
|
method: 'post',
|
||
|
data,
|
||
|
})
|
||
|
|
||
|
// 修改租户
|
||
|
export const updateTenant = (data: TenantVO) =>
|
||
|
systemServer({
|
||
|
url: '/tenant/update',
|
||
|
method: 'put',
|
||
|
data,
|
||
|
})
|
||
|
|
||
|
// 删除租户
|
||
|
export const deleteTenant = (id: number) =>
|
||
|
systemServer({
|
||
|
url: '/tenant/delete?id=' + id,
|
||
|
method: 'delete',
|
||
|
})
|
||
|
|
||
|
// 导出租户
|
||
|
export const exportTenant = (params: TenantExportReqVO) =>
|
||
|
systemServer({
|
||
|
url: '/tenant/export-excel',
|
||
|
method: 'get',
|
||
|
params,
|
||
|
responseType: 'blob',
|
||
|
})
|