master
msb_89821 2 years ago
parent 663cd217d8
commit 6bf989327b

@ -47,15 +47,17 @@ public class PassengerController {
} }
// 调服务获取验证码 // 调服务获取验证码
String smsCode = sendSMSCodeService.getSmsCode(6,passengerRequestDto.getPhoneNumber()); String smsCode = "123465";// sendSMSCodeService.getSmsCode(6,passengerRequestDto.getPhoneNumber());
if(StringUtils.isBlank(smsCode)){ if(StringUtils.isBlank(smsCode)){
log.error(""); log.error("");
return ResponseResult.fail(99,"短信验证码发送失败!"); return ResponseResult.fail(99,"短信验证码发送失败!");
} }
log.info(""+ JSON.toJSONString(smsCode)); log.info(""+ JSON.toJSONString(smsCode));
// 存入redis 有限时间 // 存入redis 有限时间
// stringRedisTemplate.opsForValue().set(PassengerConsonant.phoneNumberCodePreKey+passengerRequestDto.getPhoneNumber(),
// smsCode,2, TimeUnit.MINUTES);
stringRedisTemplate.opsForValue().set(PassengerConsonant.phoneNumberCodePreKey+passengerRequestDto.getPhoneNumber(), stringRedisTemplate.opsForValue().set(PassengerConsonant.phoneNumberCodePreKey+passengerRequestDto.getPhoneNumber(),
smsCode,2, TimeUnit.MINUTES); smsCode);
return ResponseResult.success("成功!"); return ResponseResult.success("成功!");

@ -88,10 +88,10 @@ public class SendSmsCodeController {
} }
JSONObject jsonObject=JSON.parseObject(rutlet); JSONObject jsonObject=JSON.parseObject(rutlet);
Integer status=jsonObject.getInteger("status"); Integer status=jsonObject.getInteger("status");
if (!Integer.valueOf(0).equals(status)){ // if (!Integer.valueOf(0).equals(status)){
log.info("发送失败。。"); // log.info("发送失败。。");
return ""; // return "";
} // }
return String.valueOf(radom); return String.valueOf(radom);
} }

Loading…
Cancel
Save