From cb6f69f1207ab6cc9c6006515cb831833cfe0d36 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期一, 24 六月 2019 11:36:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into div

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java |   41 +++++++++++++++++++++++++++++++++++------
 1 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java
index 456e56e..6f3792c 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java
@@ -101,6 +101,8 @@
 			navList = getCommonNav();
 		} else if (type == CommonContentTypeEnum.yunDongKuXie) {
 			navList = getCommonNav();
+		} else if (type == CommonContentTypeEnum.qiCheHuWai) {
+			navList = getCommonNav();
 		}
 
 		return navList;
@@ -118,17 +120,13 @@
 		} else if (type == CommonContentTypeEnum.jingPinXieBao) {
 			return getJingPinXieBaoContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.chaoNanReMai) {
-			return getJingPinXieBaoContent(cid, page, pageSize);
-		} else if (type == CommonContentTypeEnum.shuMaShouJi) {
-			return getJingPinXieBaoContent(cid, page, pageSize);
-		} else if (type == CommonContentTypeEnum.yunDongKuXie) {
-			return getJingPinXieBaoContent(cid, page, pageSize);
-		} else if (type == CommonContentTypeEnum.chaoNanReMai) {
 			return getChaoNanReMaiContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.shuMaShouJi) {
 			return getShuMaShouJiContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.yunDongKuXie) {
 			return getYunDongKuXieContent(cid, page, pageSize);
+		} else if (type == CommonContentTypeEnum.qiCheHuWai) {
+			return getQiCheHuWaiContent(cid, page, pageSize);
 		}
 		return null;
 	}
@@ -319,4 +317,35 @@
 		return new CommonContentResult(goodsList, count);
 	}
 
+	/**
+	 * 姹借溅鎴峰
+	 * 
+	 * @param cid
+	 * @param page
+	 * @param pageSize
+	 * @return
+	 */
+	private CommonContentResult getQiCheHuWaiContent(String cid, int page, int pageSize) {
+		DaTaoKeGoodsResult result = null;
+		List<Integer> cidList = new ArrayList<>();
+		cidList.add(7);
+		cidList.add(13);
+		int sort = getCommonSort(cid);
+		result = DaTaoKeApiUtil.search("", null, null, null, page, pageSize, sort);
+		DaTaoKeGoodsResult result1 = DaTaoKeApiUtil.search("杩愬姩 鐢�", cidList, null, null, page, pageSize, sort);
+		List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
+		long count = 0;
+		if (result != null) {
+			count = result.getTotalCount() + result1.getTotalCount();
+			if (result.getGoodsList() != null)
+				for (DaTaoKeDetailV2 detail : result.getGoodsList())
+					goodsList.add(TaoBaoUtil.convert(detail));
+			if (result1.getGoodsList() != null)
+				for (DaTaoKeDetailV2 detail : result1.getGoodsList())
+					goodsList.add(TaoBaoUtil.convert(detail));
+		}
+		Collections.shuffle(goodsList);
+		return new CommonContentResult(goodsList, count);
+	}
+
 }

--
Gitblit v1.8.0