Commit d3319ed9 authored by Allen Chen's avatar Allen Chen

commit

parent dc14186f
...@@ -22,7 +22,7 @@ public class CommonTest { ...@@ -22,7 +22,7 @@ public class CommonTest {
private static final String CLIENT_ID = "d0217707e1194c46b57e696ac7619a06"; private static final String CLIENT_ID = "d0217707e1194c46b57e696ac7619a06";
private static final String CLIENT_SECRET = "a5aba84483d8387030899f01276b06a194942470"; private static final String CLIENT_SECRET = "a5aba84483d8387030899f01276b06a194942470";
private String firstLogisticsOrderCode = "PC25110414698518938137527"; private String firstLogisticsOrderCode = "PC25110416466837504037527";
private static String getNowString() { private static String getNowString() {
Date date = new Date(); Date date = new Date();
...@@ -92,7 +92,7 @@ public class CommonTest { ...@@ -92,7 +92,7 @@ public class CommonTest {
*/ */
@Test @Test
public void receive() { public void receive() {
String mailNo = "773838955577767"; String mailNo = "773846466954492";
String expressCode = "STO"; String expressCode = "STO";
String action = "warehouse_sign"; String action = "warehouse_sign";
PddServiceConsoFirstBizActionNotifyRequest notifyRequest = new PddServiceConsoFirstBizActionNotifyRequest(); PddServiceConsoFirstBizActionNotifyRequest notifyRequest = new PddServiceConsoFirstBizActionNotifyRequest();
...@@ -198,7 +198,7 @@ public class CommonTest { ...@@ -198,7 +198,7 @@ public class CommonTest {
@Test @Test
public void inBound() { public void inBound() {
String mailNo = "773838955577767"; String mailNo = "773846466954492";
String expressCode = "STO"; String expressCode = "STO";
PddServiceConsoInboundRequest notifyRequest = new PddServiceConsoInboundRequest(); PddServiceConsoInboundRequest notifyRequest = new PddServiceConsoInboundRequest();
...@@ -220,8 +220,8 @@ public class CommonTest { ...@@ -220,8 +220,8 @@ public class CommonTest {
notifyRequest.getPackageInfo().setLength(30L); notifyRequest.getPackageInfo().setLength(30L);
notifyRequest.getPackageInfo().setWidth(30L); notifyRequest.getPackageInfo().setWidth(30L);
notifyRequest.getPackageInfo().setHeight(30L); notifyRequest.getPackageInfo().setHeight(30L);
notifyRequest.getPackageInfo().setWeight(1000L); notifyRequest.getPackageInfo().setWeight(600L);
notifyRequest.getPackageInfo().setActualWeight(1000L); notifyRequest.getPackageInfo().setActualWeight(600L);
notifyRequest.getPackageInfo().setGoodsType("NORMAL"); notifyRequest.getPackageInfo().setGoodsType("NORMAL");
notifyRequest.setResult(new PddServiceConsoInboundRequest.Result()); notifyRequest.setResult(new PddServiceConsoInboundRequest.Result());
...@@ -248,9 +248,7 @@ public class CommonTest { ...@@ -248,9 +248,7 @@ public class CommonTest {
*/ */
@Test @Test
public void beginPick() { public void beginPick() {
String LogisticsOrderCode = "PP25110413743895347237527"; String LogisticsOrderCode = "PP25110414221207143137527";
String mailNo = "773129289243424";
String expressCode = "STO";
String action = "begin_pick"; String action = "begin_pick";
PddServiceConsoCoBizActionNotifyRequest notifyRequest = new PddServiceConsoCoBizActionNotifyRequest(); PddServiceConsoCoBizActionNotifyRequest notifyRequest = new PddServiceConsoCoBizActionNotifyRequest();
notifyRequest.setProviderCode(PROVIDER_CODE); notifyRequest.setProviderCode(PROVIDER_CODE);
...@@ -298,9 +296,7 @@ public class CommonTest { ...@@ -298,9 +296,7 @@ public class CommonTest {
*/ */
@Test @Test
public void finishPick() { public void finishPick() {
String LogisticsOrderCode = "PP25110413743895347237527"; String LogisticsOrderCode = "PP25110414221207143137527";
String mailNo = "773129289243424";
String expressCode = "STO";
String action = "finish_pick"; String action = "finish_pick";
PddServiceConsoCoBizActionNotifyRequest notifyRequest = new PddServiceConsoCoBizActionNotifyRequest(); PddServiceConsoCoBizActionNotifyRequest notifyRequest = new PddServiceConsoCoBizActionNotifyRequest();
notifyRequest.setProviderCode(PROVIDER_CODE); notifyRequest.setProviderCode(PROVIDER_CODE);
...@@ -311,31 +307,11 @@ public class CommonTest { ...@@ -311,31 +307,11 @@ public class CommonTest {
PddServiceConsoCoBizActionNotifyRequest.Result notifyResult = new PddServiceConsoCoBizActionNotifyRequest.Result(); PddServiceConsoCoBizActionNotifyRequest.Result notifyResult = new PddServiceConsoCoBizActionNotifyRequest.Result();
// notifyRequest.setMailNo(mailNo);
// notifyRequest.setExpressCode(expressCode);
if (action == "begin_pick") {
notifyRequest.setBizActionDesc("开始拣货");
notifyResult.setCode(0);
} else if (action == "finish_pick") {
notifyRequest.setBizActionDesc("拣货完成"); notifyRequest.setBizActionDesc("拣货完成");
notifyResult.setCode(0); notifyResult.setCode(0);
} else if (action == "finish_unpack") {
notifyRequest.setBizActionDesc("拆包完成");
notifyRequest.setUnpackRemark("");
notifyResult.setCode(0);
notifyRequest.setPackageInfos(new ArrayList<>());
PddServiceConsoCoBizActionNotifyRequest.PackageInfo packageInfo = new PddServiceConsoCoBizActionNotifyRequest.PackageInfo();
notifyRequest.getPackageInfos().add(packageInfo);
packageInfo.setWeight(1100L);
packageInfo.setWidth(30L);
packageInfo.setLength(30L);
packageInfo.setHeight(30L);
packageInfo.setActualWeight(1100L);
packageInfo.setConsoType("SEA");
packageInfo.setGoodsType("SPECIAL");
}
notifyRequest.setResult(notifyResult);
notifyRequest.setResult(notifyResult);
log.info("derelictionRequest:{}", JSON.toJSONString(notifyRequest)); log.info("derelictionRequest:{}", JSON.toJSONString(notifyRequest));
JYBaseRequestModel requestModel = new JYBaseRequestModel(); JYBaseRequestModel requestModel = new JYBaseRequestModel();
...@@ -360,9 +336,9 @@ public class CommonTest { ...@@ -360,9 +336,9 @@ public class CommonTest {
@Test @Test
public void outBound() { public void outBound() {
String mailNo = "BK-25110413743895347237527"; String mailNo = "BK-25110414221207143137527";
String expressCode = "KR_JD"; String expressCode = "KR_JD";
String orderCode = "PP25110413743895347237527"; String orderCode = "PP25110414221207143137527";
// String segmentCode = "RETURNSELLER"; // String segmentCode = "RETURNSELLER";
String segmentCode = "SENDTORECEVER"; String segmentCode = "SENDTORECEVER";
...@@ -378,7 +354,6 @@ public class CommonTest { ...@@ -378,7 +354,6 @@ public class CommonTest {
notifyRequest.setIsSplitOut("Y"); notifyRequest.setIsSplitOut("Y");
notifyRequest.setPackageInfos(new ArrayList<>()); notifyRequest.setPackageInfos(new ArrayList<>());
PddServiceConsoOutboundRequest.PackageInfo packageInfo0 = new PddServiceConsoOutboundRequest.PackageInfo(); PddServiceConsoOutboundRequest.PackageInfo packageInfo0 = new PddServiceConsoOutboundRequest.PackageInfo();
notifyRequest.getPackageInfos().add(packageInfo0); notifyRequest.getPackageInfos().add(packageInfo0);
...@@ -461,8 +436,7 @@ public class CommonTest { ...@@ -461,8 +436,7 @@ public class CommonTest {
*/ */
@Test @Test
public void finishUnpack() { public void finishUnpack() {
String LogisticsOrderCode = "PP25110323338785177837527"; String LogisticsOrderCode = "PP25110415653142528037527";
// String mailNo = "773129289243424";
String action = "finish_unpack"; String action = "finish_unpack";
PddServiceConsoCoBizActionNotifyRequest notifyRequest = new PddServiceConsoCoBizActionNotifyRequest(); PddServiceConsoCoBizActionNotifyRequest notifyRequest = new PddServiceConsoCoBizActionNotifyRequest();
notifyRequest.setProviderCode(PROVIDER_CODE); notifyRequest.setProviderCode(PROVIDER_CODE);
...@@ -473,39 +447,21 @@ public class CommonTest { ...@@ -473,39 +447,21 @@ public class CommonTest {
PddServiceConsoCoBizActionNotifyRequest.Result notifyResult = new PddServiceConsoCoBizActionNotifyRequest.Result(); PddServiceConsoCoBizActionNotifyRequest.Result notifyResult = new PddServiceConsoCoBizActionNotifyRequest.Result();
// notifyRequest.setMailNo(mailNo);
// notifyRequest.setExpressCode(expressCode);
if (action == "begin_pick") {
notifyRequest.setBizActionDesc("开始拣货");
notifyResult.setCode(0);
} else if (action == "finish_pick") {
notifyRequest.setBizActionDesc("拣货完成");
notifyResult.setCode(0);
} else if (action == "finish_unpack") {
notifyRequest.setBizActionDesc("拆包完成"); notifyRequest.setBizActionDesc("拆包完成");
notifyRequest.setUnpackRemark(""); notifyRequest.setUnpackRemark("");
notifyResult.setCode(0); notifyResult.setCode(0);
notifyRequest.setPackageInfos(new ArrayList<>()); notifyRequest.setPackageInfos(new ArrayList<>());
PddServiceConsoCoBizActionNotifyRequest.PackageInfo packageInfo0 = new PddServiceConsoCoBizActionNotifyRequest.PackageInfo(); PddServiceConsoCoBizActionNotifyRequest.PackageInfo packageInfo0 = new PddServiceConsoCoBizActionNotifyRequest.PackageInfo();
notifyRequest.getPackageInfos().add(packageInfo0); notifyRequest.getPackageInfos().add(packageInfo0);
packageInfo0.setWeight(1500L); packageInfo0.setWeight(600L);
packageInfo0.setWidth(30L); packageInfo0.setWidth(30L);
packageInfo0.setHeight(30L); packageInfo0.setHeight(30L);
packageInfo0.setLength(20L); packageInfo0.setLength(30L);
packageInfo0.setActualWeight(1500L); packageInfo0.setActualWeight(600L);
packageInfo0.setConsoType("SEA"); packageInfo0.setConsoType("SEA");
packageInfo0.setGoodsType("NORMAL"); packageInfo0.setGoodsType("NORMAL");
PddServiceConsoCoBizActionNotifyRequest.PackageInfo packageInfo = new PddServiceConsoCoBizActionNotifyRequest.PackageInfo();
notifyRequest.getPackageInfos().add(packageInfo);
packageInfo.setWeight(1500L);
packageInfo.setWidth(30L);
packageInfo.setHeight(30L);
packageInfo.setLength(20L);
packageInfo.setActualWeight(1500L);
packageInfo.setConsoType("SEA");
packageInfo.setGoodsType("SPECIAL");
}
notifyRequest.setResult(notifyResult); notifyRequest.setResult(notifyResult);
...@@ -625,7 +581,6 @@ public class CommonTest { ...@@ -625,7 +581,6 @@ public class CommonTest {
// notifyRequest.setIsSplitOut("Y"); // notifyRequest.setIsSplitOut("Y");
notifyRequest.setPackageInfos(new ArrayList<>()); notifyRequest.setPackageInfos(new ArrayList<>());
PddServiceConsoOutboundRequest.PackageInfo packageInfo0 = new PddServiceConsoOutboundRequest.PackageInfo(); PddServiceConsoOutboundRequest.PackageInfo packageInfo0 = new PddServiceConsoOutboundRequest.PackageInfo();
notifyRequest.getPackageInfos().add(packageInfo0); notifyRequest.getPackageInfos().add(packageInfo0);
...@@ -687,5 +642,315 @@ public class CommonTest { ...@@ -687,5 +642,315 @@ public class CommonTest {
log.info("resp = {}", resp); log.info("resp = {}", resp);
} }
/**
* 销毁
*/
@Test
public void destroy() {
String mailNo = "773230214487313";
String expressCode = "STO";
String action = "destroy";
PddServiceConsoFirstBizActionNotifyRequest notifyRequest = new PddServiceConsoFirstBizActionNotifyRequest();
notifyRequest.setProviderCode(PROVIDER_CODE);
notifyRequest.setExecuteTime(getNowString());
notifyRequest.setTimeZone("UTC+8");
notifyRequest.setLogisticsOrderCode(firstLogisticsOrderCode);
notifyRequest.setBizAction(action);
PddServiceConsoFirstBizActionNotifyRequest.Result notifyResult = new PddServiceConsoFirstBizActionNotifyRequest.Result();
notifyRequest.setMailNo(mailNo);
notifyRequest.setExpressCode(expressCode);
if (action == "warehouse_sign") {
notifyRequest.setBizActionDesc("仓库签收");
notifyResult.setCode(0);
} else if (action == "warehouse_reject_sign") {
notifyRequest.setBizActionDesc("仓库拒签");
notifyResult.setCode(22);
notifyResult.setDesc("运输品类限制");
notifyResult.setRemark("运输品类限制");
notifyRequest.setResult(notifyResult);
} else if (action == "destroy") {
notifyRequest.setBizActionDesc("包裹销毁");
notifyResult.setCode(0);
}
notifyRequest.setResult(notifyResult);
log.info("derelictionRequest:{}", JSON.toJSONString(notifyRequest));
JYBaseRequestModel requestModel = new JYBaseRequestModel();
requestModel.setRequest(JSON.toJSONString(notifyRequest));
requestModel.setRequest_id("" + new Date().getTime());
requestModel.setType("pdd.service.conso.first.biz.action.notify");
requestModel.setTarget_client_id(CLIENT_ID);
requestModel.setClient_id(CLIENT_ID);
long time = new Date().getTime() / 1000;
requestModel.setTimestamp(time);
requestModel.setSign(PddSignTool.generateSign(requestModel, CLIENT_SECRET));
log.info("requestModel:{}", JSON.toJSONString(requestModel));
// String resp = PddHttpTool.postRequest(requestModel);
String resp = PddHttpTool.sendJsonPost(requestModel);
log.info("resp = {}", resp);
}
/**
* 入库异常
*/
@Test
public void inBoundError() {
String mailNo = "773289250144406";
String expressCode = "STO";
PddServiceConsoInboundRequest notifyRequest = new PddServiceConsoInboundRequest();
// PddServiceConsoFirstBizActionNotifyRequest notifyRequest = new PddServiceConsoFirstBizActionNotifyRequest();
notifyRequest.setProviderCode(PROVIDER_CODE);
notifyRequest.setLogisticsOrderCode(firstLogisticsOrderCode);
notifyRequest.setExecuteTime(getNowString());
// notifyRequest.setExecuteTime("2025-05-04 00:00:00");
notifyRequest.setTimeZone("UTC+8");
notifyRequest.setStatus("FULL_INBOUND");
// notifyRequest.setStatus("PART_INBOUND");
notifyRequest.setPackageQuantity(1L);
notifyRequest.setPackageInfo(new PddServiceConsoInboundRequest.PackageInfo());
notifyRequest.getPackageInfo().setMailNo(mailNo);
notifyRequest.getPackageInfo().setExpressCode(expressCode);
notifyRequest.getPackageInfo().setLength(30L);
notifyRequest.getPackageInfo().setWidth(30L);
notifyRequest.getPackageInfo().setHeight(30L);
notifyRequest.getPackageInfo().setWeight(600L);
notifyRequest.getPackageInfo().setActualWeight(600L);
notifyRequest.getPackageInfo().setGoodsType("NORMAL");
notifyRequest.setResult(new PddServiceConsoInboundRequest.Result());
notifyRequest.getResult().setCode(103);
notifyRequest.getResult().setDesc("禁限运");
notifyRequest.getResult().setRemark("禁限运");
log.info("derelictionRequest:{}", JSON.toJSONString(notifyRequest));
JYBaseRequestModel requestModel = new JYBaseRequestModel();
requestModel.setRequest(JSON.toJSONString(notifyRequest));
requestModel.setRequest_id("" + new Date().getTime());
requestModel.setType("pdd.service.conso.inbound");
requestModel.setTarget_client_id(CLIENT_ID);
requestModel.setClient_id(CLIENT_ID);
long time = new Date().getTime() / 1000;
requestModel.setTimestamp(time);
requestModel.setSign(PddSignTool.generateSign(requestModel, CLIENT_SECRET));
log.info("requestModel:{}", JSON.toJSONString(requestModel));
// String resp = PddHttpTool.postRequest(requestModel);
String resp = PddHttpTool.sendJsonPost(requestModel);
log.info("resp = {}", resp);
}
/**
* 开始拣货异常
*/
@Test
public void beginPickError() {
String LogisticsOrderCode = "PP25110414221207143137527";
String action = "begin_pick";
PddServiceConsoCoBizActionNotifyRequest notifyRequest = new PddServiceConsoCoBizActionNotifyRequest();
notifyRequest.setProviderCode(PROVIDER_CODE);
notifyRequest.setOrderCode(LogisticsOrderCode);
notifyRequest.setBizAction(action);
notifyRequest.setExecuteTime(getNowString());
notifyRequest.setTimeZone("UTC+8");
PddServiceConsoCoBizActionNotifyRequest.Result notifyResult = new PddServiceConsoCoBizActionNotifyRequest.Result();
// notifyRequest.setMailNo(mailNo);
// notifyRequest.setExpressCode(expressCode);
notifyRequest.setBizActionDesc("开始拣货");
notifyResult.setCode(102);
notifyResult.setDesc("破损");
notifyResult.setRemark("破损");
notifyRequest.setResult(notifyResult);
log.info("derelictionRequest:{}", JSON.toJSONString(notifyRequest));
JYBaseRequestModel requestModel = new JYBaseRequestModel();
requestModel.setRequest(JSON.toJSONString(notifyRequest));
requestModel.setRequest_id("" + new Date().getTime());
requestModel.setType("pdd.service.conso.co.biz.action.notify");
requestModel.setTarget_client_id(CLIENT_ID);
requestModel.setClient_id(CLIENT_ID);
long time = new Date().getTime() / 1000;
requestModel.setTimestamp(time);
requestModel.setSign(PddSignTool.generateSign(requestModel, CLIENT_SECRET));
log.info("requestModel:{}", JSON.toJSONString(requestModel));
// String resp = PddHttpTool.postRequest(requestModel);
String resp = PddHttpTool.sendJsonPost(requestModel);
log.info("resp = {}", resp);
}
/**
* 完成拣货异常
*/
@Test
public void finishPickError() {
String LogisticsOrderCode = "PP25110414221207143137527";
String action = "finish_pick";
PddServiceConsoCoBizActionNotifyRequest notifyRequest = new PddServiceConsoCoBizActionNotifyRequest();
notifyRequest.setProviderCode(PROVIDER_CODE);
notifyRequest.setOrderCode(LogisticsOrderCode);
notifyRequest.setBizAction(action);
notifyRequest.setExecuteTime(getNowString());
notifyRequest.setTimeZone("UTC+8");
PddServiceConsoCoBizActionNotifyRequest.Result notifyResult = new PddServiceConsoCoBizActionNotifyRequest.Result();
notifyRequest.setBizActionDesc("拣货完成");
notifyResult.setCode(102);
notifyResult.setRemark("破损");
notifyResult.setDesc("破损");
notifyRequest.setResult(notifyResult);
log.info("derelictionRequest:{}", JSON.toJSONString(notifyRequest));
JYBaseRequestModel requestModel = new JYBaseRequestModel();
requestModel.setRequest(JSON.toJSONString(notifyRequest));
requestModel.setRequest_id("" + new Date().getTime());
requestModel.setType("pdd.service.conso.co.biz.action.notify");
requestModel.setTarget_client_id(CLIENT_ID);
requestModel.setClient_id(CLIENT_ID);
long time = new Date().getTime() / 1000;
requestModel.setTimestamp(time);
requestModel.setSign(PddSignTool.generateSign(requestModel, CLIENT_SECRET));
log.info("requestModel:{}", JSON.toJSONString(requestModel));
// String resp = PddHttpTool.postRequest(requestModel);
String resp = PddHttpTool.sendJsonPost(requestModel);
log.info("resp = {}", resp);
}
/**
* 拣货完成后出库异常
*/
@Test
public void outBoundError() {
String mailNo = "BK-25110414221207143137527";
String expressCode = "KR_JD";
String orderCode = "PP25110414221207143137527";
// String segmentCode = "RETURNSELLER";
String segmentCode = "SENDTORECEVER";
PddServiceConsoOutboundRequest notifyRequest = new PddServiceConsoOutboundRequest();
notifyRequest.setProviderCode(PROVIDER_CODE);
notifyRequest.setOrderCode(orderCode);
notifyRequest.setSegmentCode(segmentCode);
notifyRequest.setExecuteTime(getNowString());
notifyRequest.setTimeZone("UTC+8");
// notifyRequest.setIsSplitOut("N");
notifyRequest.setIsSplitOut("Y");
notifyRequest.setPackageInfos(new ArrayList<>());
PddServiceConsoOutboundRequest.PackageInfo packageInfo0 = new PddServiceConsoOutboundRequest.PackageInfo();
notifyRequest.getPackageInfos().add(packageInfo0);
packageInfo0.setOutboundMailNo(mailNo + "1");
packageInfo0.setExpressCode(expressCode);
packageInfo0.setPackageType("2");
packageInfo0.setLength(30L);
packageInfo0.setWidth(30L);
packageInfo0.setHeight(30L);
packageInfo0.setWeight(1000L);
notifyRequest.setSenderDetail(new PddServiceConsoOutboundRequest.SenderDetail());
notifyRequest.getSenderDetail().setName("海际集货仓");
notifyRequest.getSenderDetail().setTelePhone("18660975251");
notifyRequest.getSenderDetail().setCountry("CN");
notifyRequest.getSenderDetail().setProvince("山东省");
notifyRequest.getSenderDetail().setCity("临沂市");
notifyRequest.getSenderDetail().setDistrict("兰山区");
notifyRequest.getSenderDetail().setDetailAddress("山东省临沂市兰山区横九路与纵十路交汇兰山财金智慧云仓五期二层二号仓");
notifyRequest.setReceiverDetail(new PddServiceConsoOutboundRequest.ReceiverDetail());
notifyRequest.getReceiverDetail().setName("김명상");
notifyRequest.getReceiverDetail().setTelePhone("01012345678");
notifyRequest.getReceiverDetail().setCountry("KR");
notifyRequest.getReceiverDetail().setProvince("서울특별시");
notifyRequest.getReceiverDetail().setCity("강북구");
notifyRequest.getReceiverDetail().setDistrict("강북구");
notifyRequest.getReceiverDetail().setDetailAddress("护照1号");
notifyRequest.setResult(new PddServiceConsoOutboundRequest.Result());
notifyRequest.getResult().setCode(102);
notifyRequest.getResult().setDesc("破损");
notifyRequest.getResult().setRemark("破损");
log.info("derelictionRequest:{}", JSON.toJSONString(notifyRequest));
JYBaseRequestModel requestModel = new JYBaseRequestModel();
requestModel.setRequest(JSON.toJSONString(notifyRequest));
requestModel.setRequest_id("" + new Date().getTime());
requestModel.setType("pdd.service.conso.outbound");
requestModel.setTarget_client_id(CLIENT_ID);
requestModel.setClient_id(CLIENT_ID);
long time = new Date().getTime() / 1000;
requestModel.setTimestamp(time);
requestModel.setSign(PddSignTool.generateSign(requestModel, CLIENT_SECRET));
log.info("requestModel:{}", JSON.toJSONString(requestModel));
// String resp = PddHttpTool.postRequest(requestModel);
String resp = PddHttpTool.sendJsonPost(requestModel);
log.info("resp = {}", resp);
}
/**
* 完成拆包异常
*/
@Test
public void finishUnpackError() {
String LogisticsOrderCode = "PP25110415653142528037527";
String action = "finish_unpack";
PddServiceConsoCoBizActionNotifyRequest notifyRequest = new PddServiceConsoCoBizActionNotifyRequest();
notifyRequest.setProviderCode(PROVIDER_CODE);
notifyRequest.setOrderCode(LogisticsOrderCode);
notifyRequest.setBizAction(action);
notifyRequest.setExecuteTime(getNowString());
notifyRequest.setTimeZone("UTC+8");
PddServiceConsoCoBizActionNotifyRequest.Result notifyResult = new PddServiceConsoCoBizActionNotifyRequest.Result();
notifyRequest.setBizActionDesc("拆包完成");
notifyRequest.setUnpackRemark("");
notifyResult.setCode(102);
notifyResult.setDesc("破损");
notifyResult.setRemark("破损");
notifyRequest.setPackageInfos(new ArrayList<>());
PddServiceConsoCoBizActionNotifyRequest.PackageInfo packageInfo0 = new PddServiceConsoCoBizActionNotifyRequest.PackageInfo();
notifyRequest.getPackageInfos().add(packageInfo0);
packageInfo0.setWeight(600L);
packageInfo0.setWidth(30L);
packageInfo0.setHeight(30L);
packageInfo0.setLength(30L);
packageInfo0.setActualWeight(600L);
packageInfo0.setConsoType("SEA");
packageInfo0.setGoodsType("NORMAL");
notifyRequest.setResult(notifyResult);
log.info("derelictionRequest:{}", JSON.toJSONString(notifyRequest));
JYBaseRequestModel requestModel = new JYBaseRequestModel();
requestModel.setRequest(JSON.toJSONString(notifyRequest));
requestModel.setRequest_id("" + new Date().getTime());
requestModel.setType("pdd.service.conso.co.biz.action.notify");
requestModel.setTarget_client_id(CLIENT_ID);
requestModel.setClient_id(CLIENT_ID);
long time = new Date().getTime() / 1000;
requestModel.setTimestamp(time);
requestModel.setSign(PddSignTool.generateSign(requestModel, CLIENT_SECRET));
log.info("requestModel:{}", JSON.toJSONString(requestModel));
// String resp = PddHttpTool.postRequest(requestModel);
String resp = PddHttpTool.sendJsonPost(requestModel);
log.info("resp = {}", resp);
}
} }
...@@ -47,21 +47,21 @@ public class GDTest3 { ...@@ -47,21 +47,21 @@ public class GDTest3 {
@Test @Test
public void Test2(){ public void Test2(){
Long ticketId = 176179297549537L; Long ticketId = 176224558951137L;
String waybill_no = "773484253589148"; String waybill_no = "773230214487313";
GDTicketReplyRequest replyRequest = new GDTicketReplyRequest(); GDTicketReplyRequest replyRequest = new GDTicketReplyRequest();
replyRequest.setTicket_id(ticketId); replyRequest.setTicket_id(ticketId);
replyRequest.setWaybill_no(waybill_no); replyRequest.setWaybill_no(waybill_no);
replyRequest.setHandle_result("757类型工单测试三次回复内容,赔付100,无附件"); replyRequest.setHandle_result("工单回复2");
replyRequest.setSign_state(1); replyRequest.setSign_state(1);
replyRequest.setCompensate_state(2); replyRequest.setCompensate_state(2);
replyRequest.setCompensate_amount(100); replyRequest.setCompensate_amount(100);
replyRequest.setDuty(1); replyRequest.setDuty(1);
replyRequest.setExpress_dealer("处理人四号"); replyRequest.setExpress_dealer("处理人2");
replyRequest.setExpress_dealer_contact("15067011004"); replyRequest.setExpress_dealer_contact("15067011004");
replyRequest.setReply_type(1); replyRequest.setReply_type(1);
// replyRequest.setAttach_path_list("[\"https://img-test.pddpic.com/open-gw/2066d9194a/c2c976cc793423a1d413c6395ad225c4.jpg\",\"https://img-test.pddpic.com/open-gw/2066d9194a/ceadf7d50fa2cd9850b10a3c769421e7.jpg\"]"); replyRequest.setAttach_path_list("[\"https://img-test.pddpic.com/open-gw/20add7022e/e7247b32584d7ae52b7f621d22f3c70a.jpg\"]");
replyRequest.setClient_id(CLIENT_ID); replyRequest.setClient_id(CLIENT_ID);
......
...@@ -3,36 +3,78 @@ ...@@ -3,36 +3,78 @@
"logistics_ticket_list": [ "logistics_ticket_list": [
{ {
"area_name": "韩国", "area_name": "韩国",
"created_at": 1761791335, "created_at": 1762245589,
"create_type": 1, "create_type": 1,
"description": "仍未收到货,截止到2022年,我国儿童青少年总体近视率为51.9% ,高中生戴眼镜的尤其多,几乎每5个高中生就有4人受近视困扰。\n",
"pre_delivery_id": "0", "pre_delivery_id": "0",
"source": 0, "source": 0,
"title": "包裹丢失/破损;包裹错发/漏发;mock消费者首次投诉", "title": "物流时效问题;派送延迟;妈妈摇摇头说:“这可没法说。”没有得到想要的回答,我微微皱眉,妈妈接着说:“真正厉害的人,从来不会把自己的愿望当成给别人解答疑惑的答案。每个人都想要过上最好的生活,但这不意味着就要躲开生活的磨难。所以还是要去成为你自己,哪怕代价是多失败几次。”\n",
"cabinet_code": "", "cabinet_code": "",
"compensate_state": 0, "compensate_state": 2,
"urgent_type": 0, "urgent_type": 0,
"updated_at": 1761791335, "updated_at": 1762245935,
"receive_name": "김명상", "receive_name": "김명상",
"sub_type_ids": [ "sub_type_ids": [
1303 1403
], ],
"waybill_no": "773484253589148", "waybill_no": "773230214487313",
"compensate_amount": 0, "compensate_amount": 100,
"receive_address": "제주특별자치도 제주시 추자면 韩国偏远地址", "receive_address": "서울특별시 강북구 강북구 护照1号",
"receive_contact": "01012345678", "receive_contact": "1012345678",
"express_dealer": "", "express_dealer": "处理人1",
"express_dealer_contact": "", "express_dealer_contact": "15067011004",
"handle_result": "", "express_attachment": [
"type_id": 747, {
"ticket_id": 176179133571489, "url": "https://img-test.pddpic.com/open-gw/20add7022e/e7247b32584d7ae52b7f621d22f3c70a.jpg"
"sign_state": 0, }
"duty": 0, ],
"handle_result": "工单回复1",
"type_id": 750,
"ticket_id": 176224558951137,
"sign_state": 1,
"duty": 1,
"express_company_id": 567, "express_company_id": 567,
"retreat_count": 0, "retreat_count": 1,
"status": 0 "status": 0
},
{
"area_name": "韩国",
"created_at": 1762244314,
"create_type": 1,
"description": "收到货损坏,妈妈摇摇头说:“这可没法说。”没有得到想要的回答,我微微皱眉,妈妈接着说:“真正厉害的人,从来不会把自己的愿望当成给别人解答疑惑的答案。每个人都想要过上最好的生活,但这不意味着就要躲开生活的磨难。所以还是要去成为你自己,哪怕代价是多失败几次。”\n\n",
"pre_delivery_id": "0",
"source": 0,
"title": "物流服务问题;集运费用不给开发票;每一个过来人都打着善意的旗号引导别人的生活,每次听到别人说“听我的可以让你少走弯路”或者“信我的一定没错,我是过来人”的时候,我都很想问问他们:“那如果我听了你们的,走了弯路、吃了亏、过得也不好,你们可以负责吗?”\n",
"cabinet_code": "",
"compensate_state": 2,
"urgent_type": 0,
"updated_at": 1762245098,
"receive_name": "김명상",
"sub_type_ids": [
1504
],
"waybill_no": "BK-251104137438953472375271",
"compensate_amount": 100,
"receive_address": "서울특별시 강북구 강북구 护照1号",
"receive_contact": "1012345678",
"express_dealer": "处理人2",
"express_dealer_contact": "15067011004",
"express_attachment": [
{
"url": "https://img-test.pddpic.com/open-gw/20add7022e/08e01dfeea24891a364f42546bf5f79f.jpg"
}
],
"handle_result": "工单回复2",
"type_id": 755,
"ticket_id": 176224431412481,
"sign_state": 1,
"duty": 1,
"express_company_id": 567,
"retreat_count": 1,
"status": 1
} }
], ],
"total_count": 1, "total_count": 2,
"request_id": "17617914287422136" "request_id": "17622460316480450"
} }
} }
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