forked from dyf/fys-Multi-tenant
app用户登录
This commit is contained in:
@ -14,6 +14,7 @@ import com.fuyuanshen.common.core.constant.SystemConstants;
|
|||||||
import com.fuyuanshen.common.core.domain.model.AppLoginUser;
|
import com.fuyuanshen.common.core.domain.model.AppLoginUser;
|
||||||
import com.fuyuanshen.common.core.domain.model.PasswordLoginBody;
|
import com.fuyuanshen.common.core.domain.model.PasswordLoginBody;
|
||||||
import com.fuyuanshen.common.core.enums.LoginType;
|
import com.fuyuanshen.common.core.enums.LoginType;
|
||||||
|
import com.fuyuanshen.common.core.enums.UserType;
|
||||||
import com.fuyuanshen.common.core.exception.user.CaptchaException;
|
import com.fuyuanshen.common.core.exception.user.CaptchaException;
|
||||||
import com.fuyuanshen.common.core.exception.user.CaptchaExpireException;
|
import com.fuyuanshen.common.core.exception.user.CaptchaExpireException;
|
||||||
import com.fuyuanshen.common.core.exception.user.UserException;
|
import com.fuyuanshen.common.core.exception.user.UserException;
|
||||||
@ -108,7 +109,9 @@ public class AppPasswordAuthStrategy implements IAuthStrategy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private AppUserVo loadUserByUsername(String username) {
|
private AppUserVo loadUserByUsername(String username) {
|
||||||
AppUserVo user = appUserMapper.selectVoOne(new LambdaQueryWrapper<AppUser>().eq(AppUser::getUserName, username));
|
AppUserVo user = appUserMapper.selectVoOne(new LambdaQueryWrapper<AppUser>()
|
||||||
|
.eq(AppUser::getUserName, username)
|
||||||
|
.eq(AppUser::getUserType, UserType.APP_USER.getUserType()));
|
||||||
if (ObjectUtil.isNull(user)) {
|
if (ObjectUtil.isNull(user)) {
|
||||||
log.info("登录用户:{} 不存在.", username);
|
log.info("登录用户:{} 不存在.", username);
|
||||||
throw new UserException("user.not.exists", username);
|
throw new UserException("user.not.exists", username);
|
||||||
|
Reference in New Issue
Block a user