feat: tenant

This commit is contained in:
xingyu4j
2022-11-22 13:15:07 +08:00
parent 88cb5497c5
commit 407ac853cb
10 changed files with 290 additions and 359 deletions

View File

@ -1,8 +1,36 @@
import request from '@/config/axios'
import type { TenantVO } from './types'
export interface TenantVO {
id: number
name: string
packageId: number
contactName: string
contactMobile: string
username: string
password: string
accountCount: number
expireTime: string
domain: string
status: number
createTime: string
}
export interface TenantPageReqVO extends PageParam {
name?: string
contactName?: string
contactMobile?: string
status?: number
}
export interface TenantExportReqVO {
name?: string
contactName?: string
contactMobile?: string
status?: number
}
// 查询租户列表
export const getTenantPageApi = (params) => {
export const getTenantPageApi = (params: TenantPageReqVO) => {
return request.get({ url: '/system/tenant/page', params })
}
@ -27,6 +55,6 @@ export const deleteTenantApi = (id: number) => {
}
// 导出租户
export const exportTenantApi = (params) => {
export const exportTenantApi = (params: TenantExportReqVO) => {
return request.download({ url: '/system/tenant/export-excel', params })
}

View File

@ -1,14 +0,0 @@
export type TenantVO = {
id: number
name: string
packageId: number
contactName: string
contactMobile: string
username: string
password: string
accountCount: number
expireTime: string
domain: string
status: number
createTime: string
}

View File

@ -1,8 +1,26 @@
import request from '@/config/axios'
import type { TenantPackageVO } from './types'
export interface TenantPackageVO {
id: number
name: string
status: number
remark: string
creator: string
createTime: string
updater: string
updateTime: string
menuIds: string[]
}
export interface TenantPackagePageReqVO extends PageParam {
name?: string
contactName?: string
contactMobile?: string
status?: number
}
// 查询租户套餐列表
export const getTenantPackageTypePageApi = (params) => {
export const getTenantPackageTypePageApi = (params: TenantPackagePageReqVO) => {
return request.get({ url: '/system/tenant-package/page', params })
}
@ -25,7 +43,7 @@ export const updateTenantPackageTypeApi = (data: TenantPackageVO) => {
export const deleteTenantPackageTypeApi = (id: number) => {
return request.delete({ url: '/system/tenant-package/delete?id=' + id })
}
// // 获取租户套餐精简信息列表
// 获取租户套餐精简信息列表
export const getTenantPackageList = () => {
return request.get({ url: '/system/tenant-package/get-simple-list' })
}

View File

@ -1,11 +0,0 @@
export type TenantPackageVO = {
id: number
name: string
status: number
remark: string
creator: string
createTime: string
updater: string
updateTime: string
menuIds: string[]
}