|
@@ -2,28 +2,38 @@ package cn.tr.module.sys.tenant.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
+import cn.hutool.core.comparator.CompareUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.tr.core.annotation.TenantIgnore;
|
|
import cn.tr.core.annotation.TenantIgnore;
|
|
|
|
|
+import cn.tr.core.enums.CreateEnum;
|
|
|
import cn.tr.core.exception.ServiceException;
|
|
import cn.tr.core.exception.ServiceException;
|
|
|
import cn.tr.core.exception.TRExcCode;
|
|
import cn.tr.core.exception.TRExcCode;
|
|
|
import cn.tr.core.tenant.TenantContextHolder;
|
|
import cn.tr.core.tenant.TenantContextHolder;
|
|
|
import cn.tr.core.tenant.TenantUtils;
|
|
import cn.tr.core.tenant.TenantUtils;
|
|
|
|
|
+import cn.tr.core.utils.PswUtils;
|
|
|
import cn.tr.module.sys.config.SysConfigManager;
|
|
import cn.tr.module.sys.config.SysConfigManager;
|
|
|
|
|
+import cn.tr.module.sys.tenant.dto.*;
|
|
|
import cn.tr.module.sys.tenant.mapper.SysTenantMapper;
|
|
import cn.tr.module.sys.tenant.mapper.SysTenantMapper;
|
|
|
-import cn.tr.module.sys.tenant.dto.SysTenantAddDTO;
|
|
|
|
|
-import cn.tr.module.sys.tenant.dto.SysTenantCommonDTO;
|
|
|
|
|
-import cn.tr.module.sys.tenant.dto.SysTenantQueryDTO;
|
|
|
|
|
|
|
+import cn.tr.module.sys.tenant.po.SysTenantPO;
|
|
|
|
|
+import cn.tr.module.sys.tenant.repository.SysTenantRepository;
|
|
|
import cn.tr.module.sys.tenant.service.ISysTenantPackageMenuService;
|
|
import cn.tr.module.sys.tenant.service.ISysTenantPackageMenuService;
|
|
|
|
|
+import cn.tr.module.sys.tenant.service.ISysTenantService;
|
|
|
|
|
+import cn.tr.module.sys.tenant.util.CacheUtil;
|
|
|
import cn.tr.module.sys.user.dto.*;
|
|
import cn.tr.module.sys.user.dto.*;
|
|
|
-import cn.tr.core.enums.CreateEnum;
|
|
|
|
|
import cn.tr.module.sys.user.enums.UserStatusEnum;
|
|
import cn.tr.module.sys.user.enums.UserStatusEnum;
|
|
|
-import cn.tr.module.sys.tenant.po.SysTenantPO;
|
|
|
|
|
-import cn.tr.module.sys.tenant.repository.SysTenantRepository;
|
|
|
|
|
-import cn.tr.module.sys.user.provider.SysTenantApiProvider;
|
|
|
|
|
|
|
+import cn.tr.module.sys.user.mapper.SysUserMapper;
|
|
|
|
|
+import cn.tr.module.sys.user.po.SysRolePO;
|
|
|
|
|
+import cn.tr.module.sys.user.po.SysUserPO;
|
|
|
|
|
+import cn.tr.module.sys.user.po.SysUserRolePO;
|
|
|
|
|
+import cn.tr.module.sys.user.po.SysUserTenantPO;
|
|
|
|
|
+import cn.tr.module.sys.user.repository.SysRoleRepository;
|
|
|
|
|
+import cn.tr.module.sys.user.repository.SysUserRepository;
|
|
|
|
|
+import cn.tr.module.sys.user.repository.SysUserRoleRepository;
|
|
|
|
|
+import cn.tr.module.sys.user.repository.SysUserTenantRepository;
|
|
|
import cn.tr.module.sys.user.service.*;
|
|
import cn.tr.module.sys.user.service.*;
|
|
|
-import cn.tr.module.sys.tenant.service.ISysTenantService;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -75,6 +85,18 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
|
|
@Lazy
|
|
@Lazy
|
|
|
private ISysTenantPackageMenuService tenantPackageMenuService;
|
|
private ISysTenantPackageMenuService tenantPackageMenuService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private CacheUtil cacheUtil;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private SysUserRepository sysUserRepository;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private SysRoleRepository sysRoleRepository;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private SysUserRoleRepository sysUserRoleRepository;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private SysUserTenantRepository sysUserTenantRepository;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
@TenantIgnore
|
|
@TenantIgnore
|
|
|
public List<SysTenantCommonDTO> selectSysTenantList(SysTenantQueryDTO query) {
|
|
public List<SysTenantCommonDTO> selectSysTenantList(SysTenantQueryDTO query) {
|
|
@@ -93,7 +115,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
|
|
public boolean updateSysTenantById(SysTenantCommonDTO source) {
|
|
public boolean updateSysTenantById(SysTenantCommonDTO source) {
|
|
|
validate();
|
|
validate();
|
|
|
validateSource(source);
|
|
validateSource(source);
|
|
|
- return tenantRepository.updateById(SysTenantMapper.INSTANCE.toPO(source))!=0;
|
|
|
|
|
|
|
+ return tenantRepository.updateById(SysTenantMapper.INSTANCE.toPO(source)) != 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -101,29 +123,29 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
|
|
public boolean insertSysTenant(SysTenantAddDTO source) {
|
|
public boolean insertSysTenant(SysTenantAddDTO source) {
|
|
|
validate();
|
|
validate();
|
|
|
validateSource(source);
|
|
validateSource(source);
|
|
|
- String orgId= IdWorker.getIdStr();
|
|
|
|
|
- String userId= IdWorker.getIdStr();
|
|
|
|
|
- String roleId= IdWorker.getIdStr();
|
|
|
|
|
- String portalId= IdWorker.getIdStr();
|
|
|
|
|
|
|
+ String orgId = IdWorker.getIdStr();
|
|
|
|
|
+ String userId = IdWorker.getIdStr();
|
|
|
|
|
+ String roleId = IdWorker.getIdStr();
|
|
|
|
|
+ String portalId = IdWorker.getIdStr();
|
|
|
SysTenantPO tenant = SysTenantMapper.INSTANCE.toPO(source);
|
|
SysTenantPO tenant = SysTenantMapper.INSTANCE.toPO(source);
|
|
|
tenant.setTenantUserId(userId);
|
|
tenant.setTenantUserId(userId);
|
|
|
boolean result = tenantRepository.insert(tenant) != 0;
|
|
boolean result = tenantRepository.insert(tenant) != 0;
|
|
|
- if(!result){
|
|
|
|
|
|
|
+ if (!result) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
String tenantId = tenant.getId();
|
|
String tenantId = tenant.getId();
|
|
|
- TenantUtils.execute(tenantId,()->{
|
|
|
|
|
|
|
+ TenantUtils.execute(tenantId, () -> {
|
|
|
//创建门面
|
|
//创建门面
|
|
|
portalService.insertInnerSysPortal(buildPortal(portalId));
|
|
portalService.insertInnerSysPortal(buildPortal(portalId));
|
|
|
//创建部门
|
|
//创建部门
|
|
|
- orgService.insertSysOrg(buildOrg(orgId,source.getName()));
|
|
|
|
|
|
|
+ orgService.insertSysOrg(buildOrg(orgId, source.getName()));
|
|
|
//创建角色
|
|
//创建角色
|
|
|
roleService.insertInnerSysRole(buildRole(roleId));
|
|
roleService.insertInnerSysRole(buildRole(roleId));
|
|
|
//创建租户用户
|
|
//创建租户用户
|
|
|
- userService.insertSysUser(buildUser(userId,portalId,roleId,orgId,source.
|
|
|
|
|
- getUsername(),configManager.getCurrent().getDefaultPsw(),source.getName()));
|
|
|
|
|
|
|
+ userService.insertSysUser(buildUser(userId, portalId, roleId, orgId, source.
|
|
|
|
|
+ getUsername(), configManager.getCurrent().getDefaultPsw(), source.getName()));
|
|
|
//关联用户和门户
|
|
//关联用户和门户
|
|
|
- userPortalService.assignUserPortal(userId,Collections.singleton(portalId));
|
|
|
|
|
|
|
+ userPortalService.assignUserPortal(userId, Collections.singleton(portalId));
|
|
|
});
|
|
});
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
@@ -140,45 +162,118 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public int removeSysTenantByIds(Collection<String> ids) {
|
|
public int removeSysTenantByIds(Collection<String> ids) {
|
|
|
- if(CollectionUtil.isEmpty(ids)){
|
|
|
|
|
- throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"请选择要删除的数据");
|
|
|
|
|
|
|
+ if (CollectionUtil.isEmpty(ids)) {
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "请选择要删除的数据");
|
|
|
}
|
|
}
|
|
|
String tenantId = TenantContextHolder.getTenantId();
|
|
String tenantId = TenantContextHolder.getTenantId();
|
|
|
List<SysTenantPO> tenants = tenantRepository.selectBatchIds(ids);
|
|
List<SysTenantPO> tenants = tenantRepository.selectBatchIds(ids);
|
|
|
for (SysTenantPO tenant : tenants) {
|
|
for (SysTenantPO tenant : tenants) {
|
|
|
if (StrUtil.equals(tenant.getType(), CreateEnum.sys.name())) {
|
|
if (StrUtil.equals(tenant.getType(), CreateEnum.sys.name())) {
|
|
|
- throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"无法对系统租户进行操作");
|
|
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "无法对系统租户进行操作");
|
|
|
}
|
|
}
|
|
|
- if(StrUtil.equals(tenantId,tenant.getId())){
|
|
|
|
|
- throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"无法删除自身的租户信息");
|
|
|
|
|
|
|
+ if (StrUtil.equals(tenantId, tenant.getId())) {
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "无法删除自身的租户信息");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return tenantRepository.deleteBatchIds(ids);
|
|
return tenantRepository.deleteBatchIds(ids);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public SysAdminAddCacheDTO generateAddAdmin(String tenantId) {
|
|
|
|
|
+ if (StrUtil.isEmpty(tenantId)) {
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "请传入医院ID");
|
|
|
|
|
+ }
|
|
|
|
|
+ SysTenantPO sysTenantPO = tenantRepository.selectById(tenantId);
|
|
|
|
|
+ if (ObjectUtil.isNull(sysTenantPO)) {
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "该医院不存在");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StrUtil.isNotEmpty(sysTenantPO.getTenantUserId())) {
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "该医院已经存在管理员,无须添加");
|
|
|
|
|
+ }
|
|
|
|
|
+ //增加缓存
|
|
|
|
|
+ return cacheUtil.addAdminCache(604800L, tenantId, sysTenantPO.getName());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public SysAdminAddCacheDTO getCache(String tenantId) {
|
|
|
|
|
+ return cacheUtil.getAdminCache(tenantId);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
|
+ public boolean saveAdmin(SysAdminAddDTO adminAddDTO) {
|
|
|
|
|
+ //校验失效
|
|
|
|
|
+ SysAdminAddCacheDTO adminCache = cacheUtil.getAdminCache(adminAddDTO.getTenantId());
|
|
|
|
|
+ //缓存对象内容为空即缓存不存在
|
|
|
|
|
+ if (StrUtil.isBlank(adminCache.getTenantId())) {
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "缓存已失效,请重新生成链接添加管理员");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(CompareUtil.compare(adminCache.getTenantId(), adminCache.getTenantId(), true)!=0){
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "医院ID跟缓存中的不匹配");
|
|
|
|
|
+ }
|
|
|
|
|
+ //校验手机code码正确
|
|
|
|
|
+ String phoneCode = cacheUtil.getPhoneCode();
|
|
|
|
|
+ if (!StrUtil.equals(phoneCode, adminAddDTO.getSmsCode())) {
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "手机验证码错误");
|
|
|
|
|
+ }
|
|
|
|
|
+ //查询手机号是否已经存储了如果已经存储使用已经存储的用户
|
|
|
|
|
+ SysUserPO sysUserPO = sysUserRepository.selectOne(new LambdaQueryWrapper<SysUserPO>()
|
|
|
|
|
+ .eq(SysUserPO::getPhone, adminAddDTO.getPhone())
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ if(Objects.isNull(sysUserPO)){
|
|
|
|
|
+ sysUserPO = SysUserMapper.INSTANCE.addAdminDTOtoPO(adminAddDTO);
|
|
|
|
|
+ sysUserPO.setUsername(adminAddDTO.getPhone());
|
|
|
|
|
+ sysUserPO.setPassword(PswUtils.encryptPassword(adminAddDTO.getPassword()));
|
|
|
|
|
+ sysUserPO.setStatus(UserStatusEnum.normal.getValue());
|
|
|
|
|
+ sysUserPO.setDeleted(Boolean.FALSE);
|
|
|
|
|
+ sysUserRepository.insert(sysUserPO);
|
|
|
|
|
+ }
|
|
|
|
|
+ SysUserTenantPO sysUserTenantPO = new SysUserTenantPO();
|
|
|
|
|
+ sysUserTenantPO.setUserId(sysUserPO.getId());
|
|
|
|
|
+ sysUserTenantPO.setTenantId(adminAddDTO.getTenantId());
|
|
|
|
|
+ sysUserTenantRepository.insert(sysUserTenantPO);
|
|
|
|
|
+ SysRolePO sysRolePO = sysRoleRepository.selectOne(new LambdaQueryWrapper<SysRolePO>()
|
|
|
|
|
+ .eq(SysRolePO::getTenantId, adminAddDTO.getTenantId())
|
|
|
|
|
+ .eq(SysRolePO::getCode, "admin")
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ if(ObjectUtil.isNull(sysRolePO)){
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "该医院没有角色,请先添加角色");
|
|
|
|
|
+ }
|
|
|
|
|
+ SysUserRolePO sysUserRolePO = new SysUserRolePO();
|
|
|
|
|
+ sysUserRolePO.setUserId(sysUserPO.getId());
|
|
|
|
|
+ sysUserRolePO.setRoleId(sysRolePO.getId());
|
|
|
|
|
+ sysUserRolePO.setTenantId(adminAddDTO.getTenantId());
|
|
|
|
|
+ //回写管理员ID到医院包
|
|
|
|
|
+ tenantRepository.update(null, new LambdaUpdateWrapper<SysTenantPO>()
|
|
|
|
|
+ .set(SysTenantPO::getTenantUserId, sysUserPO.getId())
|
|
|
|
|
+ .eq(SysTenantPO::getId, adminAddDTO.getTenantId()));
|
|
|
|
|
+ return sysUserRoleRepository.insert(sysUserRolePO) != 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public Set<SysMenuDTO> getTenantMenus(String tenantId) {
|
|
public Set<SysMenuDTO> getTenantMenus(String tenantId) {
|
|
|
SysTenantPO tenant = tenantRepository.selectById(tenantId);
|
|
SysTenantPO tenant = tenantRepository.selectById(tenantId);
|
|
|
- return tenantPackageMenuService.findMenuIdByPackageId(tenant.getPackageId());
|
|
|
|
|
|
|
+ return tenantPackageMenuService.findMenuIdByPackageId(tenant.getPackageId());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void validateSource(SysTenantAddDTO source){
|
|
|
|
|
|
|
+ private void validateSource(SysTenantAddDTO source) {
|
|
|
SysTenantPO sysTenantPO = tenantRepository.selectOne(new LambdaQueryWrapper<SysTenantPO>()
|
|
SysTenantPO sysTenantPO = tenantRepository.selectOne(new LambdaQueryWrapper<SysTenantPO>()
|
|
|
.eq(SysTenantPO::getName, source.getName()));
|
|
.eq(SysTenantPO::getName, source.getName()));
|
|
|
- if(ObjectUtil.isNotNull(sysTenantPO)){
|
|
|
|
|
- throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"租户名称不能重复");
|
|
|
|
|
|
|
+ if (ObjectUtil.isNotNull(sysTenantPO)) {
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "租户名称不能重复");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void validateSource(SysTenantCommonDTO source){
|
|
|
|
|
|
|
+ private void validateSource(SysTenantCommonDTO source) {
|
|
|
SysTenantPO sysTenantPO = tenantRepository.selectOne(new LambdaQueryWrapper<SysTenantPO>()
|
|
SysTenantPO sysTenantPO = tenantRepository.selectOne(new LambdaQueryWrapper<SysTenantPO>()
|
|
|
- .ne(StrUtil.isNotEmpty(source.getId()),SysTenantPO::getId,source.getId())
|
|
|
|
|
|
|
+ .ne(StrUtil.isNotEmpty(source.getId()), SysTenantPO::getId, source.getId())
|
|
|
.eq(SysTenantPO::getName, source.getName()));
|
|
.eq(SysTenantPO::getName, source.getName()));
|
|
|
- if(ObjectUtil.isNotNull(sysTenantPO)){
|
|
|
|
|
- throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"租户名称不能重复");
|
|
|
|
|
|
|
+ if (ObjectUtil.isNotNull(sysTenantPO)) {
|
|
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "租户名称不能重复");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- private SysPortalDTO buildPortal(String portalId){
|
|
|
|
|
|
|
+
|
|
|
|
|
+ private SysPortalDTO buildPortal(String portalId) {
|
|
|
SysPortalDTO org = new SysPortalDTO();
|
|
SysPortalDTO org = new SysPortalDTO();
|
|
|
org.setId(portalId);
|
|
org.setId(portalId);
|
|
|
org.setCode("admin");
|
|
org.setCode("admin");
|
|
@@ -187,7 +282,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
|
|
return org;
|
|
return org;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private SysOrgDTO buildOrg(String orgId,String tenantName){
|
|
|
|
|
|
|
+ private SysOrgDTO buildOrg(String orgId, String tenantName) {
|
|
|
SysOrgDTO org = new SysOrgDTO();
|
|
SysOrgDTO org = new SysOrgDTO();
|
|
|
org.setId(orgId);
|
|
org.setId(orgId);
|
|
|
org.setParentId("0");
|
|
org.setParentId("0");
|
|
@@ -197,7 +292,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
|
|
return org;
|
|
return org;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private SysRoleDTO buildRole(String roleId){
|
|
|
|
|
|
|
+ private SysRoleDTO buildRole(String roleId) {
|
|
|
SysRoleDTO role = new SysRoleDTO();
|
|
SysRoleDTO role = new SysRoleDTO();
|
|
|
role.setId(roleId);
|
|
role.setId(roleId);
|
|
|
role.setDataScope("1");
|
|
role.setDataScope("1");
|
|
@@ -210,7 +305,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
|
|
return role;
|
|
return role;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private SysUserDTO buildUser(String userId,String portalId,String roleId,String orgId,String username,String password,String tenantName){
|
|
|
|
|
|
|
+ private SysUserDTO buildUser(String userId, String portalId, String roleId, String orgId, String username, String password, String tenantName) {
|
|
|
SysUserDTO user = new SysUserDTO();
|
|
SysUserDTO user = new SysUserDTO();
|
|
|
user.setId(userId);
|
|
user.setId(userId);
|
|
|
user.setOrgId(orgId);
|
|
user.setOrgId(orgId);
|
|
@@ -223,8 +318,8 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
|
|
return user;
|
|
return user;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void validate(){
|
|
|
|
|
- if(!Boolean.TRUE.equals(tenantEnable)){
|
|
|
|
|
|
|
+ private void validate() {
|
|
|
|
|
+ if (!Boolean.TRUE.equals(tenantEnable)) {
|
|
|
throw new UnsupportedOperationException("多租户功能已关闭");
|
|
throw new UnsupportedOperationException("多租户功能已关闭");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|