|
@@ -19,6 +19,7 @@ import org.dromara.common.core.domain.model.LoginBody;
|
|
import org.dromara.common.core.domain.model.PasswordLoginBody;
|
|
import org.dromara.common.core.domain.model.PasswordLoginBody;
|
|
import org.dromara.common.core.domain.model.RegisterBody;
|
|
import org.dromara.common.core.domain.model.RegisterBody;
|
|
import org.dromara.common.core.domain.model.SocialLoginBody;
|
|
import org.dromara.common.core.domain.model.SocialLoginBody;
|
|
|
|
+import org.dromara.common.core.exception.user.UserException;
|
|
import org.dromara.common.core.utils.*;
|
|
import org.dromara.common.core.utils.*;
|
|
import org.dromara.common.encrypt.annotation.ApiEncrypt;
|
|
import org.dromara.common.encrypt.annotation.ApiEncrypt;
|
|
import org.dromara.common.json.utils.JsonUtils;
|
|
import org.dromara.common.json.utils.JsonUtils;
|
|
@@ -98,7 +99,10 @@ public class AuthController {
|
|
//查询用户的租户id
|
|
//查询用户的租户id
|
|
PasswordLoginBody loginBodyUser = JsonUtils.parseObject(body, PasswordLoginBody.class);
|
|
PasswordLoginBody loginBodyUser = JsonUtils.parseObject(body, PasswordLoginBody.class);
|
|
String username = loginBodyUser.getUsername();
|
|
String username = loginBodyUser.getUsername();
|
|
- SysUserVo sysUserVo = userService.selectUserByUserName(username);
|
|
|
|
|
|
+ SysUserVo sysUserVo = userService.selectUserByUserNameNoTenant(username);
|
|
|
|
+ if (ObjectUtil.isNull(sysUserVo)) {
|
|
|
|
+ throw new UserException("user.not.exists", username);
|
|
|
|
+ }
|
|
String tenantId = sysUserVo.getTenantId();
|
|
String tenantId = sysUserVo.getTenantId();
|
|
//登录默认给一个租户id 000000
|
|
//登录默认给一个租户id 000000
|
|
loginBody.setTenantId("000000");
|
|
loginBody.setTenantId("000000");
|