From f4548a3ee46afe45da4ee2a42dc169c575deee9f Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期三, 31 七月 2019 11:57:36 +0800 Subject: [PATCH] 动态v2兼容 --- 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