解决租户会被误删的bug

This commit is contained in:
季圣华
2021-08-28 22:10:28 +08:00
parent f46166a56b
commit dff734d736
2 changed files with 9 additions and 0 deletions

View File

@@ -263,6 +263,12 @@ public class UserService {
throw new BusinessRunTimeException(ExceptionConstants.USER_LIMIT_DELETE_CODE,
ExceptionConstants.USER_LIMIT_DELETE_MSG);
}
if(user.getId().equals(user.getTenantId())) {
logger.error("异常码[{}],异常提示[{}],参数,ids:[{}]",
ExceptionConstants.USER_LIMIT_TENANT_DELETE_CODE,ExceptionConstants.USER_LIMIT_TENANT_DELETE_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.USER_LIMIT_TENANT_DELETE_CODE,
ExceptionConstants.USER_LIMIT_TENANT_DELETE_MSG);
}
sb.append("[").append(user.getLoginName()).append("]");
}
logService.insertLog("用户", sb.toString(),