提交 4260ea04 编写于 作者: F fengyw

集成领课云短信通道

上级 89d8498b
......@@ -75,13 +75,17 @@ public class SmsUtil {
map.put("signName", signName);
map.put("signatureNonce", String.valueOf(System.currentTimeMillis()));
map.put("sign", sign(map, accessKeySecret));
JSONObject jn = JSONUtil.parseObj(HttpUtil.post("https://cloud.roncoos.com/gateway/user/api/sms/send/sms", map));
if (jn.getInt("code").equals(200)) {
return true;
} else {
log.error("发送错误", jn.getStr("msg"));
return false;
}
try {
JSONObject jn = JSONUtil.parseObj(HttpUtil.post("https://cloud.roncoos.com/gateway/user/api/sms/send/sms", map));
if (!jn.getInt("code").equals(200)) {
log.error("发送错误", jn.toString());
return false;
}
return true;
} catch (Exception e) {
log.error("发送错误", e);
return false;
}
}
/**
......
......@@ -144,7 +144,6 @@ public class ApiUsersBiz extends BaseBiz {
public Result<String> sendCode(SendCodeReq req) {
String code = NOUtil.getVerCode();
if (SmsUtil.sendVerCode(req.getMobile(), code, feignSysConfig.getSms())) {
// 缓存5分钟
cacheRedis.set(Constants.RedisPre.CODE + req.getMobile(), code, 5, TimeUnit.MINUTES);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册