fix 修复 管理租户被修改导致无法登录超管账号问题

This commit is contained in:
疯狂的狮子Li
2023-03-13 23:29:05 +08:00
parent 4f301205fe
commit 0ec6fbd34c
4 changed files with 23 additions and 0 deletions
@@ -104,6 +104,7 @@ public class SysTenantController extends BaseController {
@RepeatSubmit()
@PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysTenantBo bo) {
sysTenantService.checkTenantAllowed(bo.getTenantId());
if (!sysTenantService.checkCompanyNameUnique(bo)) {
throw new ServiceException("修改租户'" + bo.getCompanyName() + "'失败,公司名称已存在");
}
@@ -118,6 +119,7 @@ public class SysTenantController extends BaseController {
@Log(title = "租户", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public R<Void> changeStatus(@RequestBody SysTenantBo bo) {
sysTenantService.checkTenantAllowed(bo.getTenantId());
return toAjax(sysTenantService.updateTenantStatus(bo));
}