| | |
| | | import com.ruoyi.system.api.domain.AppMiniLoginVO; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.domain.dto.AppMiniLoginDTO; |
| | | import com.ruoyi.system.api.domain.dto.AppMiniRegisterDTO; |
| | | import com.ruoyi.system.api.feignClient.AuctionClient; |
| | | import com.ruoyi.system.api.feignClient.MemberClient; |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 登录校验方法 |
| | |
| | | if (!verificationCodeCache.equals(verificationCode)) { |
| | | throw new ServiceException("验证码错误,请重新输入!"); |
| | | } |
| | | // 校验密码,6位数数字 |
| | | if (!password.matches("^\\d{6}$")) { |
| | | throw new ServiceException("密码必须为6位数字!"); |
| | | } |
| | | R<LoginUser> userInfo = remoteUserService.getUserInfo(username, SecurityConstants.INNER); |
| | | if (R.FAIL == userInfo.getCode()) { |
| | | throw new ServiceException(userInfo.getMsg()); |
| | | } |
| | | remoteUserService.changePassword(username, SecurityUtils.encryptPassword(password), |
| | | SecurityConstants.INNER); |
| | | redisService.deleteObject( |
| | | CacheConstants.CHANGE_PASSWORD_CAPTCHA_CODE_KEY + username); |
| | | } |
| | | } |