|
|
@ -19,7 +19,6 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
|
|
|
import org.springframework.security.crypto.password.PasswordEncoder; |
|
|
|
import org.springframework.security.crypto.password.PasswordEncoder; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.server.ServerErrorException; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.HashSet; |
|
|
|
import java.util.HashSet; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
@ -94,7 +93,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 检测多租户信息是否存在,不存在抛出异常
|
|
|
|
// 检测多租户信息是否存在,不存在抛出异常
|
|
|
|
if (tenantCode.size() == 0) { |
|
|
|
if (tenantCode.size() == 0) { |
|
|
|
throw new Exception("当前用户多租户不存在,请联系统管理员检查多租户是否过期或者冻结!"); |
|
|
|
throw new CheckedException("当前用户多租户不存在,请联系统管理员检查多租户是否过期或者冻结!"); |
|
|
|
} |
|
|
|
} |
|
|
|
user.setTenantId(String.join(",", tenantCode)); |
|
|
|
user.setTenantId(String.join(",", tenantCode)); |
|
|
|
user.setPermissions(ArrayUtil.toArray(permissions, String.class)); |
|
|
|
user.setPermissions(ArrayUtil.toArray(permissions, String.class)); |
|
|
|