Commit c8598ab2 by zhiheng.zhang

小票打印判断空

parent d07c937f
......@@ -917,12 +917,14 @@ public class OrderSdkAdapter {
productList.add(productBean);
}
for(QueryOrdersResponse.DataBean.OrderBean.ProductBean sendProductBean : productList){
if(!sendProductBean.getIsSendGoods()) {
sendProductBean.setSendProduct(productList.stream()
.filter(productBean -> productBean.getOriginalGoodsUid().equalsIgnoreCase(sendProductBean.getCartGoodsUid()) && productBean.getIsSendGoods() == true)
.map(o -> JSON.parseObject(JSON.toJSONString(o), QueryOrdersResponse.DataBean.OrderBean.ProductBean.class))
.collect(Collectors.toList()));
if(null != productList && productList.size() >0) {
for (QueryOrdersResponse.DataBean.OrderBean.ProductBean sendProductBean : productList) {
if (null !=sendProductBean.getIsSendGoods() && !sendProductBean.getIsSendGoods()) {
sendProductBean.setSendProduct(productList.stream()
.filter(productBean -> productBean.getOriginalGoodsUid().equalsIgnoreCase(sendProductBean.getCartGoodsUid()) && productBean.getIsSendGoods() == true)
.map(o -> JSON.parseObject(JSON.toJSONString(o), QueryOrdersResponse.DataBean.OrderBean.ProductBean.class))
.collect(Collectors.toList()));
}
}
}
return productList;
......
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