售后问题修改、快递鸟返回错误修改

This commit is contained in:
taozi
2023-04-08 21:43:39 +08:00
parent 631f584494
commit 874c3ccb47
5 changed files with 28 additions and 8 deletions

View File

@ -9,7 +9,10 @@ import cn.hutool.http.HttpUtil;
import co.yixiang.enums.ShipperCodeEnum;
import co.yixiang.modules.tools.express.dao.ExpressInfo;
import co.yixiang.modules.tools.express.config.ExpressProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.Base64Utils;
@ -67,6 +70,9 @@ public class ExpressService implements Serializable {
try {
String result = getOrderTracesByJson(OrderCode,ShipperCode, LogisticCode,lastFourNumber);
ObjectMapper objMap = new ObjectMapper();
objMap.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objMap.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
objMap.setSerializationInclusion(JsonInclude.Include.NON_NULL);
ExpressInfo ei = objMap.readValue(result, ExpressInfo.class);
ei.setShipperName(getVendorName(ShipperCode));
return ei;