From 770ede03b2e532ff3729a8f447bdb4351637ca63 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期二, 02 六月 2020 12:02:58 +0800
Subject: [PATCH] 云发单兼容动态+商品详情

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java |   33 ++++++++++++++++++++++++++-------
 1 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
index 6844eb2..402dcd7 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
@@ -1040,7 +1040,6 @@
 			int darenMonth = 0;
 			int highVIPMonth = 0;
 			int superVIPMonth = 0;
-			Date date = new Date();
 			Date minTime = TimeUtil.parseYYYYMMDD(firstday);
 			Date maxTime = TimeUtil.parseYYYYMMDD_HHMMSS(lastday + " 23:59:59");
 			List<TeamDailyRecord> listMonth = teamDailyRecordService.sumGroupByYearMonth(uid, minTime, maxTime);
@@ -1202,14 +1201,24 @@
 		if (directNum > 0) {
 			indirectNum = threeSaleSerivce.countSecondTeam(workerId);
 		}
-
+		data.put("fansNum", "鐩存帴绮変笣锛� " + directNum + "浜篭n" + "闂存帴绮変笣锛� " + indirectNum + "浜�");
+		
 		// 璁㈠崟缁熻
 		long countTB = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_TAOBAO, 60);
 		long countJD = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_JD, 60);
 		long countPDD = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_PDD, 60);
-
-		data.put("fansNum", "鐩存帴绮変笣锛� " + directNum + "浜篭n" + "闂存帴绮変笣锛� " + indirectNum + "浜�");
-		data.put("orderInfo", "娣樺疂 (" + countTB + "绗�)\n" + "浜笢 (" + countJD + "绗�)\n" + "鎷煎澶� (" + countPDD + "绗�)");
+		
+		StringBuilder builder = new StringBuilder();
+		builder.append("娣樺疂 (" + countTB + "绗�)");
+		builder.append("\n浜笢 (" + countJD + "绗�)");
+		builder.append("\n鎷煎澶� (" + countPDD + "绗�)");
+		if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
+			long countVip = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_VIP, 60);
+			long countSL = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_SUNING, 60);
+			builder.append("\n鍞搧浼� (" + countVip + "绗�)");
+			builder.append("\n鑻忓畞 (" + countSL + "绗�)");
+		}
+		data.put("orderInfo", builder.toString());
 		out.print(JsonUtil.loadTrueResult(data));
 	}
 
@@ -1335,14 +1344,24 @@
 		if (directNum > 0) {
 			indirectNum = threeSaleSerivce.countSecondTeam(fansId);
 		}
+		data.put("fansNum", "鐩存帴绮変笣锛� " + directNum + "浜篭n" + "闂存帴绮変笣锛� " + indirectNum + "浜�");
 
 		// 璁㈠崟缁熻
 		long countTB = commonOrderCountService.countOrderBySourceAndNearDay(fansId, Constant.SOURCE_TYPE_TAOBAO, 60);
 		long countJD = commonOrderCountService.countOrderBySourceAndNearDay(fansId, Constant.SOURCE_TYPE_JD, 60);
 		long countPDD = commonOrderCountService.countOrderBySourceAndNearDay(fansId, Constant.SOURCE_TYPE_PDD, 60);
 
-		data.put("fansNum", "鐩存帴绮変笣锛� " + directNum + "浜篭n" + "闂存帴绮変笣锛� " + indirectNum + "浜�");
-		data.put("orderInfo", "娣樺疂 (" + countTB + "绗�)\n" + "浜笢 (" + countJD + "绗�)\n" + "鎷煎澶� (" + countPDD + "绗�)");
+		StringBuilder builder = new StringBuilder();
+		builder.append("娣樺疂 (" + countTB + "绗�)");
+		builder.append("\n浜笢 (" + countJD + "绗�)");
+		builder.append("\n鎷煎澶� (" + countPDD + "绗�)");
+		if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
+			long countVip = commonOrderCountService.countOrderBySourceAndNearDay(fansId, Constant.SOURCE_TYPE_VIP, 60);
+			long countSL = commonOrderCountService.countOrderBySourceAndNearDay(fansId, Constant.SOURCE_TYPE_SUNING, 60);
+			builder.append("\n鍞搧浼� (" + countVip + "绗�)");
+			builder.append("\n鑻忓畞 (" + countSL + "绗�)");
+		}
+		data.put("orderInfo", builder.toString());
 		JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
 	}
 

--
Gitblit v1.8.0