|
|
@ -212,8 +212,15 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl<UserResiInfoDao, Us |
|
|
|
} |
|
|
|
//3:调用短信服务 生成验证码发送短信
|
|
|
|
result = messageFeignClient.sendSmsCaptcha(verificationCodeFormDTO.getMobile()); |
|
|
|
//4:将验证码存入redis
|
|
|
|
Map<String,Object> map = (Map<String, Object>) result.getData(); |
|
|
|
if(null == map) { |
|
|
|
result.setCode(EpmetErrorCode.MOBILE_GET_CODE_ERROR.getValue()); |
|
|
|
result.setMsg(EpmetErrorCode.MOBILE_GET_CODE_ERROR.getName()); |
|
|
|
return result; |
|
|
|
} |
|
|
|
//4:删除缓存中可能存在的旧验证码
|
|
|
|
userResiInfoRedis.deleteOldUserMobileCode(verificationCodeFormDTO.getUserId(), verificationCodeFormDTO.getMobile()); |
|
|
|
//5:将验证码存入redis
|
|
|
|
userResiInfoRedis.setUserResiMobileCode(verificationCodeFormDTO.getUserId(),verificationCodeFormDTO.getMobile(),map.get("code").toString()); |
|
|
|
return result; |
|
|
|
} |
|
|
|