From 25b7e040153e96fd7c9f649e9b0de8932e1a2a00 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 13 八月 2019 15:47:33 +0800
Subject: [PATCH] Merge branch 'mater-1.6.0' into div

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java |   41 ++++++++++++++++++++++++++---------------
 1 files changed, 26 insertions(+), 15 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 7d27c30..cb5910b 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
@@ -23,6 +23,7 @@
 import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
 import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
 import com.yeshi.fanli.service.inter.lable.TaoKeGoodsService;
+import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
 import com.yeshi.fanli.service.inter.taobao.TaobaoMeterialService;
 import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
 import com.yeshi.fanli.util.Constant;
@@ -47,6 +48,9 @@
 
 	@Resource
 	private QualityGoodsService qualityGoodsService;
+
+	@Resource
+	private TaoBaoGoodsUpdateService taoBaoGoodsUpdateService;
 
 	private static List<CommonContentNav> getCommonNav() {
 		List<CommonContentNav> navList = new ArrayList<>();
@@ -134,36 +138,43 @@
 	@Cacheable(value = "commonContentCache", key = "#type+'-'+#cid+'-'+#page+'-'+#pageSize")
 	@Override
 	public CommonContentResult getContentList(CommonContentTypeEnum type, String cid, int page, int pageSize) {
+		CommonContentResult result = null;
 		if (type == CommonContentTypeEnum._9k9) {
-			return get9K9Content(cid, page, pageSize);
+			result = get9K9Content(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.juJia) {
-			return getJuJiaShengHuoContent(cid, page, pageSize);
+			result = getJuJiaShengHuoContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.muYin) {
-			return getMuYinJingXuanContent(cid, page, pageSize);
+			result = getMuYinJingXuanContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.meiShi) {
-			return getYouXuanMeiShiContent(cid, page, pageSize);
+			result = getYouXuanMeiShiContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.chuanYiDaPei) {
-			return getChuanYiDaPeiContent(cid, page, pageSize);
+			result = getChuanYiDaPeiContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.meiZhuangGehu) {
-			return getMeiZhuangGeHuContent(cid, page, pageSize);
+			result = getMeiZhuangGeHuContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.jingPinXieBao) {
-			return getJingPinXieBaoContent(cid, page, pageSize);
+			result = getJingPinXieBaoContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.chaoNanReMai) {
-			return getChaoNanReMaiContent(cid, page, pageSize);
+			result = getChaoNanReMaiContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.shuMaShouJi) {
-			return getShuMaShouJiContent(cid, page, pageSize);
+			result = getShuMaShouJiContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.yunDongKuXie) {
-			return getYunDongKuXieContent(cid, page, pageSize);
+			result = getYunDongKuXieContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.qiCheHuWai) {
-			return getQiCheHuWaiContent(cid, page, pageSize);
+			result = getQiCheHuWaiContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.chaoPinReMai) {
-			return getChaoPinReMaiContent(cid, page, pageSize);
+			result = getChaoPinReMaiContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.chaoSheng) {
-			return getCaoShengContent(cid, page, pageSize);
+			result = getCaoShengContent(cid, page, pageSize);
 		} else if (type == CommonContentTypeEnum.haoQuan) {
-			return getHaoQuanContent(cid, page, pageSize);
+			result = getHaoQuanContent(cid, page, pageSize);
 		}
-		return null;
+		if (result != null) {// 鍟嗗搧淇℃伅杩囨护
+			List<TaoBaoGoodsBrief> goodsList = taoBaoGoodsUpdateService
+					.filterImportantTaoBaoGoods(result.getGoodsList());
+			result.setGoodsList(goodsList);
+		}
+
+		return result;
 	}
 
 	/**

--
Gitblit v1.8.0