|
@@ -2,6 +2,7 @@ package com.ym.mec.auth.core.provider.service;
|
|
|
|
|
|
import com.ym.mec.auth.api.dto.SysUserInfo;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
+import com.ym.mec.auth.core.handler.TenantNotFoundException;
|
|
|
import com.ym.mec.auth.service.SysUserService;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.common.security.AuthUser;
|
|
@@ -25,9 +26,6 @@ import java.util.List;
|
|
|
public class DefaultUserDetailsService implements UserDetailsService {
|
|
|
|
|
|
@Autowired
|
|
|
- private PasswordEncoder passwordEncoder;
|
|
|
-
|
|
|
- @Autowired
|
|
|
private SysUserService sysUserService;
|
|
|
|
|
|
private final String BCRYPT = "{bcrypt}";
|
|
@@ -53,7 +51,7 @@ public class DefaultUserDetailsService implements UserDetailsService {
|
|
|
}
|
|
|
Integer tenantId = userInfo.getSysUser().getTenantId();
|
|
|
if (tenantId == null || tenantId == 0) {
|
|
|
- throw new BizException("机构信息异常,请联系管理员");
|
|
|
+ throw new TenantNotFoundException("机构信息异常,请联系管理员");
|
|
|
}
|
|
|
|
|
|
List<GrantedAuthority> authorities = null;
|