Commit 37cac631 by vega

fix:反序列化问题

parent a8261b11
package com.freemud.application.sdk.api.ordercenter.service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.freemud.application.sdk.api.base.BaseRequest;
import com.freemud.application.sdk.api.ordercenter.config.OrderCenterProperties;
import com.freemud.application.sdk.api.ordercenter.constant.InterfaceAddressConstant;
......@@ -618,15 +619,7 @@ public class OrderSdkService {
} else {
List<OrderInfoReqs> result;
if (Objects.equals(ResponseConstant.SUCCESS_RESPONSE_CODE, responseDTO.getCode()) && responseDTO.getResult() instanceof List) {
result = (List<OrderInfoReqs>) ((List)responseDTO.getResult()).stream().map(map -> {
OrderInfoReqs orderInfoReqs = new OrderInfoReqs();
try {
org.apache.commons.beanutils.BeanUtils.populate(orderInfoReqs, (Map)map);
} catch (IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
}
return orderInfoReqs;
}).collect(Collectors.toCollection(LinkedList::new));
result = JSONArray.parseArray(JSON.toJSONString(responseDTO.getResult()), OrderInfoReqs.class);
} else {
result = Collections.emptyList();
}
......
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