|
@@ -575,6 +575,10 @@ public class LoginService extends ServiceImpl<PersonnelMapper, Personnel> {
|
|
throw new XiaoShiException(ExceptionEnum.THE_PHONE_FORMAT_ERROR);
|
|
throw new XiaoShiException(ExceptionEnum.THE_PHONE_FORMAT_ERROR);
|
|
}
|
|
}
|
|
if (StringUtils.isNotEmpty(vo.getPhoneNum())) {
|
|
if (StringUtils.isNotEmpty(vo.getPhoneNum())) {
|
|
|
|
+ String code = redisUtil.get(LoginCacheKeyUtil.getLoginCaptcha(vo.getPhoneNum()));
|
|
|
|
+ if (org.apache.commons.lang3.StringUtils.isNotEmpty(code)) {
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, "请在60秒后重新获取验证码");
|
|
|
|
+ }
|
|
//生成验证码
|
|
//生成验证码
|
|
String random = RandomUtil.getSixRandom();
|
|
String random = RandomUtil.getSixRandom();
|
|
//手机号和验证码放进缓存 设置过期时间60s
|
|
//手机号和验证码放进缓存 设置过期时间60s
|