From 27c1fd58461e2fd15be392b3c308b4343af8d973 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期三, 01 四月 2020 14:53:50 +0800
Subject: [PATCH] 发圈统计

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java |   46 ++++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 22 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 da9cc4e..b4e7db2 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
@@ -1856,7 +1856,9 @@
 				if (sourceType.equals(commonOrder.getSourceType()) && orderNo.equals(commonOrder.getOrderNo())) {
 					CommonOrderGoodsVO commonGoodsVO = new CommonOrderGoodsVO();
 					PropertyUtils.copyProperties(commonGoodsVO, goods);
-					commonGoodsVO.setGoodsType(sourceType);
+					if (commonGoodsVO.getGoodsType() == null) {
+						commonGoodsVO.setGoodsType(sourceType);
+					}
 
 					// 娣樺疂鍟嗗搧鍥剧墖澶勭悊
 					String picture = commonGoodsVO.getPicture();
@@ -1888,24 +1890,35 @@
 					}
 
 					// 璁㈠崟绫诲瀷涓虹┖鏃� 宸插晢鍝佺被涓哄噯
-					Integer orderType = order.getOrderType();
-					if (orderType == null) {
-						String shopType = commonGoodsVO.getShopType();
-						if (CommonOrderGoodsVO.TYPE_TAOBAO.equalsIgnoreCase(shopType)) {
-							order.setOrderType(1);
-						} else if (CommonOrderGoodsVO.TYPE_TMALL.equalsIgnoreCase(shopType)) {
-							order.setOrderType(2);
-						}
+					String shopType = commonGoodsVO.getShopType();
+					if (CommonOrderGoodsVO.TYPE_TAOBAO.equalsIgnoreCase(shopType)) {
+						order.setOrderType(1);
+					} else if (CommonOrderGoodsVO.TYPE_TMALL.equalsIgnoreCase(shopType)) {
+						order.setOrderType(2);
 					}
 					
 					Integer goodsType = commonGoodsVO.getGoodsType();
-					if (goodsType != null & goodsType == 6) {
-						order.setOrderType(5); // 楗夸簡涔堣鍗�
+					if (goodsType != null & goodsType == Constant.SOURCE_TYPE_ELME) {
+						order.setOrderType(Constant.SOURCE_TYPE_ELME); // 楗夸簡涔堣鍗�
 					}
 
 					order.getListOrderGoods().add(commonGoodsVO);
 				}
 			}
+			
+			
+			// 璁㈠崟绫诲瀷
+			if (sourceType == Constant.SOURCE_TYPE_TAOBAO) {
+				Integer orderType = order.getOrderType();
+				if (orderType == null) {
+					order.setOrderType(1);
+				}
+			} else if (sourceType == Constant.SOURCE_TYPE_JD) {
+				order.setOrderType(3);
+			} else if (sourceType == Constant.SOURCE_TYPE_PDD) {
+				order.setOrderType(4);
+			}
+						
 
 			Date thirdCreateTime = order.getThirdCreateTime();
 			if (thirdCreateTime != null) {
@@ -1918,16 +1931,6 @@
 				order.setReceiveTime("鏀惰揣鏃堕棿锛�" + format.format(settleTime));
 			}
 
-			// 璁㈠崟绫诲瀷
-			if (sourceType == Constant.SOURCE_TYPE_TAOBAO) {
-				Integer orderType = order.getOrderType();
-				if (orderType == null)
-					order.setOrderType(1);
-			} else if (sourceType == Constant.SOURCE_TYPE_JD) {
-				order.setOrderType(3);
-			} else if (sourceType == Constant.SOURCE_TYPE_PDD) {
-				order.setOrderType(4);
-			}
 
 			/* 璁㈠崟鐘舵�� 杞崲澶勭悊 */
 			String orderStateContent = "";
@@ -1978,7 +1981,6 @@
 					List<TaoBaoWeiQuanOrder> listWQ = taoBaoWeiQuanOrderMapper
 							.selectListByOrderIdAndState(order.getOrderNo(), "缁存潈鎴愬姛");
 
-					boolean isPart = false;// 榛樿澶辨晥
 					BigDecimal weiQuanMoney = getWeiQuanMoney(listWQ, sourceType, uid);
 					if (settleTime != null && august != null && settleTime.getTime() > august.getTime()) {
 						orderStateContent = "鍞悗鎴愬姛";

--
Gitblit v1.8.0