add: multi-tenant
This commit is contained in:
39
src/modules/system/service/sys_tenant.go
Normal file
39
src/modules/system/service/sys_tenant.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"be.ems/src/framework/vo"
|
||||
"be.ems/src/modules/system/model"
|
||||
)
|
||||
|
||||
// ISysTenant 租户管理 服务层接口
|
||||
type ISysTenant interface {
|
||||
// SelectTenantList 查询租户管理数据
|
||||
SelectTenantList(sysTenant model.SysTenant, dataScopeSQL string) []model.SysTenant
|
||||
|
||||
// SelectTenantListByRoleId 根据角色ID查询租户树信息
|
||||
SelectTenantListByRoleId(roleId string) []string
|
||||
|
||||
// SelectTenantById 根据租户ID查询信息
|
||||
SelectTenantById(tenantId string) model.SysTenant
|
||||
|
||||
// HasChildByTenantId 是否存在子节点
|
||||
HasChildByTenantId(tenantId string) int64
|
||||
|
||||
// CheckTenantExistUser 查询租户是否存在用户
|
||||
CheckTenantExistUser(tenantId string) int64
|
||||
|
||||
// CheckUniqueTenantName 校验同级租户名称是否唯一
|
||||
CheckUniqueTenantName(tenantName, parentId, tenantId string) bool
|
||||
|
||||
// InsertTenant 新增租户信息
|
||||
InsertTenant(sysTenant model.SysTenant) string
|
||||
|
||||
// UpdateTenant 修改租户信息
|
||||
UpdateTenant(sysTenant model.SysTenant) int64
|
||||
|
||||
// DeleteTenantById 删除租户管理信息
|
||||
DeleteTenantById(tenantId string) int64
|
||||
|
||||
// SelectTenantTreeSelect 查询租户树结构信息
|
||||
SelectTenantTreeSelect(sysTenant model.SysTenant, dataScopeSQL string) []vo.TreeSelect
|
||||
}
|
||||
Reference in New Issue
Block a user