ShiShiYiBan/yudao-ui-admin-vue3/src/api/system/tenant/index.ts

63 lines
1.4 KiB
TypeScript
Raw Normal View History

2022-11-03 16:55:01 +08:00
import request from '@/config/axios'
2022-11-22 13:15:07 +08:00
export interface TenantVO {
id: number
name: string
contactName: string
contactMobile: string
2022-11-29 22:26:50 +08:00
status: number
domain: string
packageId: number
2022-11-22 13:15:07 +08:00
username: string
password: string
2022-11-29 22:26:50 +08:00
expireTime: Date
2022-11-22 13:15:07 +08:00
accountCount: number
2022-11-29 22:26:50 +08:00
createTime: Date
2022-11-22 13:15:07 +08:00
}
export interface TenantPageReqVO extends PageParam {
name?: string
contactName?: string
contactMobile?: string
status?: number
2022-11-29 22:26:50 +08:00
createTime?: Date[]
2022-11-22 13:15:07 +08:00
}
export interface TenantExportReqVO {
name?: string
contactName?: string
contactMobile?: string
status?: number
2022-11-29 22:26:50 +08:00
createTime?: Date[]
2022-11-22 13:15:07 +08:00
}
2022-07-18 19:06:37 +08:00
// 查询租户列表
2022-11-22 13:15:07 +08:00
export const getTenantPageApi = (params: TenantPageReqVO) => {
2022-07-19 22:33:54 +08:00
return request.get({ url: '/system/tenant/page', params })
2022-07-18 19:06:37 +08:00
}
// 查询租户详情
export const getTenantApi = (id: number) => {
2022-07-19 22:33:54 +08:00
return request.get({ url: '/system/tenant/get?id=' + id })
2022-07-18 19:06:37 +08:00
}
// 新增租户
2022-07-19 22:33:54 +08:00
export const createTenantApi = (data: TenantVO) => {
return request.post({ url: '/system/tenant/create', data })
2022-07-18 19:06:37 +08:00
}
// 修改租户
2022-07-19 22:33:54 +08:00
export const updateTenantApi = (data: TenantVO) => {
return request.put({ url: '/system/tenant/update', data })
2022-07-18 19:06:37 +08:00
}
// 删除租户
export const deleteTenantApi = (id: number) => {
2022-07-19 22:33:54 +08:00
return request.delete({ url: '/system/tenant/delete?id=' + id })
2022-07-18 19:06:37 +08:00
}
// 导出租户
2022-11-22 13:15:07 +08:00
export const exportTenantApi = (params: TenantExportReqVO) => {
2022-07-25 21:03:14 +08:00
return request.download({ url: '/system/tenant/export-excel', params })
2022-07-18 19:06:37 +08:00
}