Commit 37895e79 authored by honghy's avatar honghy

短信调货通知调整

parent babf89dc
package cn.iocoder.yudao.framework.http.example;
package cn.iocoder.yudao.framework.http.sms;
import cn.iocoder.yudao.framework.http.core.Request;
import cn.iocoder.yudao.framework.http.core.Response;
import cn.iocoder.yudao.framework.http.core.client.HttpClient;
import cn.iocoder.yudao.framework.http.core.client.HttpClientFactory;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import java.util.HashMap;
......@@ -15,6 +16,7 @@ import java.util.Map;
* @author wuxian
* @since 2024-10-23
**/
@Slf4j
public class SendchampHttp {
private static final String SMS_URL = "https://api.sendchamp.com/api/v1/sms/send";
......@@ -27,8 +29,8 @@ public class SendchampHttp {
req.setParamFormat(Request.ParamFormat.JSON);
try {
Response res = client.execute(req, Request.Option.create(0, 0, header));
System.out.println("response code ---------------------------->" + res.getCode());
System.out.println("response content is --------------------》" + res.getBody());
log.warn("response code ---------------------------->" + res.getCode());
log.warn("response content is --------------------》" + res.getBody());
return res;
} catch (Exception e) {
throw new RuntimeException(e);
......
package cn.iocoder.yudao.framework.http.example;
package cn.iocoder.yudao.framework.http.sms;
import cn.iocoder.yudao.framework.http.core.Request;
import cn.iocoder.yudao.framework.http.core.Response;
import cn.iocoder.yudao.framework.http.core.client.HttpClient;
import cn.iocoder.yudao.framework.http.core.client.HttpClientFactory;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -14,6 +15,7 @@ import java.util.Map;
* @author wuxian
* @since 2024-10-23
**/
@Slf4j
public class WhisperClientHttp {
public void testPost(){
......@@ -47,8 +49,8 @@ public class WhisperClientHttp {
req.setParamFormat(Request.ParamFormat.JSON);
try {
Response res = client.execute(req,Request.Option.create(0,0,header));
System.out.println("response code ---------------------------->"+res.getCode());
System.out.println("response content is --------------------》"+res.getBody());
log.warn("response code ---------------------------->"+res.getCode());
log.warn("response content is --------------------》"+res.getBody());
} catch (Exception e) {
throw new RuntimeException(e);
}
......
package cn.iocoder.yudao.framework.http.example;
package cn.iocoder.yudao.framework.http.sms;
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
import cn.iocoder.yudao.framework.http.core.Request;
......@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.http.core.Response;
import cn.iocoder.yudao.framework.http.core.client.HttpClient;
import cn.iocoder.yudao.framework.http.core.client.HttpClientFactory;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import java.time.ZoneId;
import java.time.ZonedDateTime;
......@@ -16,6 +17,7 @@ import java.util.*;
* @author wuxian
* @since 2024-10-30
**/
@Slf4j
public class YCloudWhatsappHttp {
private HttpClient client = null;
......@@ -36,8 +38,8 @@ public class YCloudWhatsappHttp {
Request req = Request.create(WA_URL, Request.Method.POST, param);
req.setParamFormat(Request.ParamFormat.JSON);
Response res = client.execute(req, Request.Option.create(0, 0, header));
System.out.println("response code ---------------------------->" + res.getCode());
System.out.println("response content is --------------------》" + res.getBody());
log.warn("response code ---------------------------->" + res.getCode());
log.warn("response content is --------------------》" + res.getBody());
return res;
}
......@@ -45,8 +47,8 @@ public class YCloudWhatsappHttp {
public Response getReceiveStatus(Map<String, String> header, String id) {
Request req = Request.create(RECEIVE_URL + id, Request.Method.GET, "");
Response res = client.execute(req, Request.Option.create(0, 0, header));
System.out.println("response code ---------------------------->" + res.getCode());
System.out.println("response content is --------------------》" + res.getBody());
log.warn("response code ---------------------------->" + res.getCode());
log.warn("response content is --------------------》" + res.getBody());
return res;
}
......
......@@ -4,7 +4,7 @@ import cn.hutool.core.lang.Assert;
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
import cn.iocoder.yudao.framework.common.util.json.core.KeyValue;
import cn.iocoder.yudao.framework.http.core.Response;
import cn.iocoder.yudao.framework.http.example.SendchampHttp;
import cn.iocoder.yudao.framework.http.sms.SendchampHttp;
import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult;
import cn.iocoder.yudao.framework.sms.core.client.dto.*;
import cn.iocoder.yudao.framework.sms.core.client.impl.AbstractSmsClient;
......
......@@ -4,7 +4,7 @@ import cn.hutool.core.lang.Assert;
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
import cn.iocoder.yudao.framework.common.util.json.core.KeyValue;
import cn.iocoder.yudao.framework.http.core.Response;
import cn.iocoder.yudao.framework.http.example.YCloudWhatsappHttp;
import cn.iocoder.yudao.framework.http.sms.YCloudWhatsappHttp;
import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult;
import cn.iocoder.yudao.framework.sms.core.client.dto.*;
import cn.iocoder.yudao.framework.sms.core.client.impl.AbstractSmsClient;
......
......@@ -1245,8 +1245,8 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo
reqDTO.setMobile(consignorPhone);
reqDTO.setUserId(consignorCustomerId);
reqDTO.setNodeValue(nodeValue);
reqDTO.setIsTransport(SmsIsTransportEnum.SMS_ORDERS_1.getValue());
reqDTO.setTransportId(orderDO.getTransportId());
reqDTO.setIsTransport(SmsIsTransportEnum.SMS_ORDERS_0.getValue());
reqDTO.setTransportId(TransportTypeEnum.OTHER.getValue());
reqDTO.setIsOrders(SmsIsOrdersEnum.SMS_ORDERS_0.getValue());
reqDTO.setMessageType(SmsMessageTypeEnum.SMS_MESSAGE_TYPE_1.getValue());
reqDTO.setTemplateParams(templateParams);
......
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