From b7a7c009d04b8b2b4aec81a4174e2ce83e478f1a Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 07 八月 2019 09:28:16 +0800
Subject: [PATCH] 拼多多/京东首页推荐随机
---
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/CommonContentControllerV2.java | 20 +++++---------------
1 files changed, 5 insertions(+), 15 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..e994e79 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
@@ -76,18 +76,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 +113,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 +189,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)));
}
}
}
@@ -238,7 +228,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