Commit 169ef3ce by fanjiaxin

推客分佣单阿波罗配置调整

parent 8c4b927f
Pipeline #75527 passed with stages
in 1 minute 3 seconds
...@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service; ...@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.UUID;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
...@@ -44,7 +45,7 @@ public class SmsServiceImpl implements ISmsService { ...@@ -44,7 +45,7 @@ public class SmsServiceImpl implements ISmsService {
validateSendCode(bo.getScenes(), bo.getMobilePhone()); validateSendCode(bo.getScenes(), bo.getMobilePhone());
boolean success = sendCode(bo.getScenes(), bo.getMobilePhone()); boolean success = sendCode(bo.getScenes(), bo.getMobilePhone());
if (!success) { if (!success) {
log.error("[op:sendSmsCode] is fail..."); log.error("[op:sendSmsCode] is error...");
throw new BizException("短信验证码发送失败"); throw new BizException("短信验证码发送失败");
} }
} }
...@@ -77,7 +78,7 @@ public class SmsServiceImpl implements ISmsService { ...@@ -77,7 +78,7 @@ public class SmsServiceImpl implements ISmsService {
// 生成6位随机数字 // 生成6位随机数字
String code = RandomUtils.randomNumber(6); String code = RandomUtils.randomNumber(6);
// uas发送验证码 // uas发送验证码
boolean success = iUasClient.sendSmsCode("1", boolean success = iUasClient.sendSmsCode(UUID.randomUUID().toString(),
mobilePhone, code, scenes, scenesConfigBO); mobilePhone, code, scenes, scenesConfigBO);
if (!success) { if (!success) {
return false; return false;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
*/ */
package com.netease.yanxuan.wx.store.sharer.integration.client.impl; package com.netease.yanxuan.wx.store.sharer.integration.client.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.netease.yanxuan.wx.store.sharer.integration.client.IUasClient; import com.netease.yanxuan.wx.store.sharer.integration.client.IUasClient;
import com.netease.yanxuan.wx.store.sharer.integration.config.RpcConfig; import com.netease.yanxuan.wx.store.sharer.integration.config.RpcConfig;
...@@ -45,12 +46,15 @@ public class UasClientImpl implements IUasClient { ...@@ -45,12 +46,15 @@ public class UasClientImpl implements IUasClient {
public boolean sendSmsCode(String uid, String phone, String code, public boolean sendSmsCode(String uid, String phone, String code,
String scenes, SmsCodeScenesConfigBO scenesConfigBO) { String scenes, SmsCodeScenesConfigBO scenesConfigBO) {
Map<String, Object> params = assembleSmsArg(uid, phone, code, scenes, scenesConfigBO); Map<String, Object> params = assembleSmsArg(uid, phone, code, scenes, scenesConfigBO);
log.error("[op:UasClientImpl:sendSmsCode] params:{}", JSON.toJSONString(params));
String httpUrl = rpcConfig.getUasUrl() + SMS_SEND_PATH + PRODUCT; String httpUrl = rpcConfig.getUasUrl() + SMS_SEND_PATH + PRODUCT;
try { try {
log.error("[op:UasClientImpl:sendSmsCode] httpUrl:{}", httpUrl);
JSONObject rpcResult = restTemplateHandler.execute(httpUrl, HttpMethod.POST, params, JSONObject.class); JSONObject rpcResult = restTemplateHandler.execute(httpUrl, HttpMethod.POST, params, JSONObject.class);
log.error("[op:UasClientImpl:sendSmsCode] rpcResult:{}", JSON.toJSONString(rpcResult));
return rpcResult.getIntValue("code") == 200; return rpcResult.getIntValue("code") == 200;
} catch (Exception e) { } catch (Exception e) {
log.error("[SMS_SEND_CODE] send code error:", e); log.error("[op:UasClientImpl:sendSmsCode] is error", e);
return false; return false;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment