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