From f4548a3ee46afe45da4ee2a42dc169c575deee9f Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期三, 31 七月 2019 11:57:36 +0800
Subject: [PATCH] 动态v2兼容

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
index 15d76b2..cf251b8 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -269,6 +269,8 @@
 						e.printStackTrace();
 					}
 
+					commonGoodsVO.setGoodsType(sourceType2);
+					
 					String picture = commonGoodsVO.getPicture();
 					if (!StringUtil.isNullOrEmpty(picture) && !picture.contains("320x320")) {
 						commonGoodsVO.setPicture(TbImgUtil.getTBSize320Img(picture));
@@ -296,9 +298,7 @@
 					}
 					// 瀹炰粯娆�
 					commonGoodsVO.setActualPay("浠樻閲戦锛毬�" + totalSettlement);
-
-					listOrderGoods.add(commonGoodsVO);
-
+					
 					Integer orderType = order.getOrderType();
 					if (orderType == null) {
 						String shopType = commonGoodsVO.getShopType();
@@ -307,14 +307,8 @@
 						} else if (CommonOrderGoodsVO.TYPE_TMALL.equalsIgnoreCase(shopType)) {
 							order.setOrderType(2);
 						} 
-						
-						if (Constant.SOURCE_TYPE_JD == sourceType2) {
-							order.setOrderType(3);
-						} else if (Constant.SOURCE_TYPE_PDD == sourceType2) {
-							order.setOrderType(4);
-						}
 					}
-
+					listOrderGoods.add(commonGoodsVO);
 					break;
 				}
 			}
@@ -339,6 +333,18 @@
 			if (settleTime != null) {
 				order.setReceiveTime("鏀惰揣鏃堕棿锛�" + format.format(settleTime));
 			}
+			
+			Integer sourceType2 = order.getSourceType();
+			if (sourceType2 == Constant.SOURCE_TYPE_TAOBAO) {
+				Integer orderType = order.getOrderType();
+				if (orderType == null) {
+					 order.setOrderType(1);
+				} 
+			} else if (sourceType2 == Constant.SOURCE_TYPE_JD) {
+				 order.setOrderType(3);
+			}  else if (sourceType2 == Constant.SOURCE_TYPE_PDD) {
+				 order.setOrderType(4);
+			}
 
 			/* 璁㈠崟鐘舵�� 杞崲澶勭悊 */
 			String orderStateContent = "";

--
Gitblit v1.8.0