From 28cf328a098334b51a3e9d2d56f983fb8c862211 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期六, 23 五月 2020 09:54:38 +0800
Subject: [PATCH] 足迹、收藏订单兼容新需求

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/order/tb/TaoBaoOrderServiceImpl.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/tb/TaoBaoOrderServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/tb/TaoBaoOrderServiceImpl.java
index 028f526..d2988bf 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/tb/TaoBaoOrderServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/tb/TaoBaoOrderServiceImpl.java
@@ -137,8 +137,17 @@
 
 			// 鏈夐噸澶嶇殑浜ゆ槗ID涓嶅鐞�
 			if (tradesIds.size() != list.size()) {
+				// 鍘婚櫎閲嶅浜ゆ槗ID
+				tradesIds = new HashSet<>();
+				for (int i = 0; i < list.size(); i++) {
+					if (tradesIds.contains(list.get(i).getTradeId())) {
+						list.remove(i--);
+					} else
+						tradesIds.add(list.get(i).getTradeId());
+				}
+
 				LogHelper.test("妫�娴嬪埌浜ゆ槗ID閲嶅闂:" + orderId);
-				throw new Exception();
+//				throw new Exception();
 			}
 
 			List<TaoBaoOrder> oldOrderList = taoBaoOrderMapper.selectTaoBaoOrderByOrderId(orderId);
@@ -177,6 +186,7 @@
 			// 鎻愪氦浜嬪姟
 			transactionManager.commit(transactionStatus);
 		} catch (Exception e) {
+			e.printStackTrace();
 			transactionManager.rollback(transactionStatus);
 		}
 	}

--
Gitblit v1.8.0