From 54b0dd1b6f8230799b0b4490f8b39afdd53a4e4c Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期三, 21 八月 2019 09:30:57 +0800
Subject: [PATCH] 积分明细

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/CommonContentControllerV2.java |   36 +++++++++++++++++++-----------------
 1 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/CommonContentControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/CommonContentControllerV2.java
index 563c1cb..302b704 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/CommonContentControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/CommonContentControllerV2.java
@@ -29,6 +29,7 @@
 import com.yeshi.fanli.service.inter.goods.CommonTemplateContentService;
 import com.yeshi.fanli.service.inter.goods.JDCommonTemplateContentService;
 import com.yeshi.fanli.service.inter.goods.PDDCommonTemplateContentService;
+import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
 import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
 import com.yeshi.fanli.tag.PageEntity;
 import com.yeshi.fanli.util.Constant;
@@ -48,7 +49,9 @@
 @RequestMapping("api/v2/commoncontent")
 public class CommonContentControllerV2 {
 
-
+	@Resource
+	private SwiperPictureService swiperPictureService;
+	
 	@Resource
 	private HongBaoManageService hongBaoManageService;
 
@@ -76,18 +79,13 @@
 			return;
 		}
 		
-		if (type == null) {
-			out.print(JsonUtil.loadFalseResult(1, "璇蜂紶鍏ョ被鍨�"));
-			return;
-		}
-		
 		List<CommonContentNav> list = null;
-		if (type == Constant.SOURCE_TYPE_TAOBAO) {
+		if (type == null || type == Constant.SOURCE_TYPE_TAOBAO) {
 			list = commonTemplateContentService.getNavList(CommonContentTypeEnum.valueOf(key));
 		} else if (type == Constant.SOURCE_TYPE_JD) {
 			// 鏆傛棤鍒嗙被
 		} else if (type == Constant.SOURCE_TYPE_PDD) {
-			// 鏆傛棤鍒嗙被
+			list = pddCommonTemplateContentService.getNavList(PDDCommonContentTypeEnum.valueOf(key));
 		}
 		
 		if (list == null) {
@@ -118,12 +116,7 @@
 			return;
 		}
 
-		if (type == null) {
-			out.print(JsonUtil.loadFalseResult(1, "璇蜂紶鍏ョ被鍨�"));
-			return;
-		}
-		
-		if (type == Constant.SOURCE_TYPE_TAOBAO) {
+		if (type == null || type == Constant.SOURCE_TYPE_TAOBAO) {
 			getListTB(acceptData, key, page, cid, out);
 			return;
 		}
@@ -199,7 +192,7 @@
 				Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
 						.excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 				for (JDGoods goods : goodsList) {
-					array.add(gson.toJson(GoodsDetailVOFactory.convertJDGoods(goods, null, fanLiRate, shareRate)));
+					array.add(gson.toJson(GoodsDetailVOFactory.convertJDGoods(goods, fanLiRate, shareRate)));
 				}
 			}
 		}
@@ -221,7 +214,16 @@
 	public void getListPDD(AcceptData acceptData, String key, Integer page, String cid, PrintWriter out) {
 		JSONObject data = new JSONObject();
 		if (page == 1) {
-			List<SwiperPicture> bannerList = new ArrayList<>();
+			// 2銆侀《閮ㄨ疆鎾浘
+			List<SwiperPicture> bannerList = null;
+			if (Constant.IS_TEST) {
+				bannerList = swiperPictureService.getByBannerCard("index_top");
+			}	
+			
+			if (bannerList == null) {
+				bannerList = new ArrayList<SwiperPicture>();
+			}
+
 			data.put("bannerList", new Gson().toJson(bannerList));
 		}
 		
@@ -238,7 +240,7 @@
 				Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
 						.excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 				for (PDDGoodsDetail goods : goodsList) {
-					array.add(gson.toJson(GoodsDetailVOFactory.convertPDDGoods(goods, null, fanLiRate, shareRate)));
+					array.add(gson.toJson(GoodsDetailVOFactory.convertPDDGoods(goods, fanLiRate, shareRate)));
 				}
 			}
 		}

--
Gitblit v1.8.0