| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.dromara.common.core.constant.Constants; |
| | | import org.dromara.common.core.constant.GlobalConstants; |
| | | import org.dromara.common.core.constant.SystemConstants; |
| | | import org.dromara.common.core.domain.model.LoginUser; |
| | | import org.dromara.common.core.domain.model.PasswordLoginBody; |
| | | import org.dromara.common.core.enums.LoginType; |
| | | import org.dromara.common.core.enums.UserStatus; |
| | | import org.dromara.common.core.exception.user.CaptchaException; |
| | | import org.dromara.common.core.exception.user.CaptchaExpireException; |
| | | import org.dromara.common.core.exception.user.UserException; |
| | |
| | | if (ObjectUtil.isNull(user)) { |
| | | log.info("登录用户:{} 不存在.", username); |
| | | throw new UserException("user.not.exists", username); |
| | | } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { |
| | | } else if (SystemConstants.DISABLE.equals(user.getStatus())) { |
| | | log.info("登录用户:{} 已被停用.", username); |
| | | throw new UserException("user.blocked", username); |
| | | } |