1.修复云霄接口异常问题,修改对象转json字符串空属性默认值问题

master
x_z 2 years ago
parent 964de967d9
commit c3a1944861

@ -339,7 +339,7 @@ public class YxzyyClient {
} }
} }
udiwmsOrderRequest.setItem(items); udiwmsOrderRequest.setItems(items);
BasicThirdSysDetailEntity basicThirdSysDetailEntity = basicThirdSysDetailDao.selectByKey("orderSubmitUrl", thirdSysConfig.getThirdSysConfig().getThirdId()); BasicThirdSysDetailEntity basicThirdSysDetailEntity = basicThirdSysDetailDao.selectByKey("orderSubmitUrl", thirdSysConfig.getThirdSysConfig().getThirdId());
//记录日志 //记录日志
@ -453,5 +453,4 @@ public class YxzyyClient {
return thirdId; return thirdId;
} }
} }

@ -26,6 +26,6 @@ public class YxOrderRequest {
private String useDeptCode; private String useDeptCode;
private String useDeptName; private String useDeptName;
private List<UdiwmsOrderDetail> item; //单据详情数组 private List<UdiwmsOrderDetail> items; //单据详情数组
} }

@ -1,6 +1,7 @@
package com.glxp.mipsdl.admin.util; package com.glxp.mipsdl.admin.util;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.glxp.mipsdl.admin.http.OkHttpCli; import com.glxp.mipsdl.admin.http.OkHttpCli;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -67,7 +68,8 @@ public class HttpClient {
public String postJson(String url, Object object, String... headers) { public String postJson(String url, Object object, String... headers) {
String json = JSONObject.toJSON(object).toString(); //转json字符串时将空属性转换为空字符串
String json = JSONObject.toJSONString(object, SerializerFeature.WriteNullStringAsEmpty);
logger.info(url + "\n" + json); logger.info(url + "\n" + json);
String response = ""; String response = "";

Loading…
Cancel
Save