提交
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package co.yixiang.yshop.module.express.kdniao.model.dto;
|
||||
|
||||
import lombok.*;
|
||||
import org.omg.PortableInterceptor.INACTIVE;
|
||||
|
||||
/**
|
||||
* 电子面单 DTO
|
||||
|
@ -17,7 +17,6 @@ import java.util.List;
|
||||
* 快递鸟-物流-响应参数
|
||||
* </p>
|
||||
* @author hupeng
|
||||
* @date 2023/7/21
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@ -114,7 +113,7 @@ public class KdniaoApiVO {
|
||||
this.statusName = KdniaoLogisticsStatusEnum.getEnum(this.State).getDesc();
|
||||
this.statusExName = KdniaoLogisticsStatusEnum.getEnum(this.StateEx).getDesc();
|
||||
if (CollectionUtils.isEmpty(this.Traces)) {
|
||||
this.Traces = new ArrayList();
|
||||
this.Traces = new ArrayList<>();
|
||||
}
|
||||
this.Traces.forEach(item -> item.actionName = KdniaoLogisticsStatusEnum.getEnum(item.Action).getDesc());
|
||||
}
|
||||
|
@ -17,10 +17,7 @@ import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
@ -44,7 +41,7 @@ public class KdniaoUtil {
|
||||
*/
|
||||
public static KdniaoApiVO getLogisticInfo(KdniaoApiDTO queryDTO){
|
||||
KdniaoApiVO kdniaoApiVO = new KdniaoUtil().getLogisticBase(queryDTO);
|
||||
if (kdniaoApiVO.getSuccess() == "false"){
|
||||
if (Objects.equals(kdniaoApiVO.getSuccess(), "false")){
|
||||
throw ServiceExceptionUtil.exception(new ErrorCode(999999,kdniaoApiVO.getReason()));
|
||||
}
|
||||
|
||||
@ -85,14 +82,14 @@ public class KdniaoUtil {
|
||||
|
||||
// 组装应用级参数
|
||||
Map<String, String> requestParamMap = new HashMap<>();
|
||||
requestParamMap.put("shipperCode", shipperCode);
|
||||
requestParamMap.put("ShipperCode", shipperCode);
|
||||
requestParamMap.put("LogisticCode", logisticCode);
|
||||
String RequestData = JSON.toJSONString(requestParamMap);
|
||||
// 组装系统级参数
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("RequestData", this.urlEncoder(RequestData, "UTF-8"));
|
||||
params.put("EBusinessID", EBusinessID);
|
||||
params.put("RequestType", "1002");//免费1002 收费8001
|
||||
params.put("RequestType", "8001");//免费1002 收费8001
|
||||
String dataSign = this.encrypt(RequestData, ApiKey, "UTF-8");
|
||||
params.put("DataSign", this.urlEncoder(dataSign, "UTF-8"));
|
||||
params.put("DataType", "2");
|
||||
|
Reference in New Issue
Block a user