From 778109ce66911ec61a1ffb88b41808241e61b7a1 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 29 七月 2019 11:51:37 +0800 Subject: [PATCH] 通用调整 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/CommonContentControllerV2.java | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 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 24d6b30..563c1cb 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 @@ -70,18 +70,23 @@ * @param out */ @RequestMapping(value = "getNavList", method = RequestMethod.POST) - public void getNavList(AcceptData acceptData, String key, Integer goodsType, PrintWriter out) { + public void getNavList(AcceptData acceptData, String key, Integer type, PrintWriter out) { if (StringUtil.isNullOrEmpty(key)) { out.print(JsonUtil.loadFalseResult(1, "璇蜂紶鍏ey")); return; } + if (type == null) { + out.print(JsonUtil.loadFalseResult(1, "璇蜂紶鍏ョ被鍨�")); + return; + } + List<CommonContentNav> list = null; - if (goodsType == null || goodsType == Constant.SOURCE_TYPE_TAOBAO) { + if (type == Constant.SOURCE_TYPE_TAOBAO) { list = commonTemplateContentService.getNavList(CommonContentTypeEnum.valueOf(key)); - } else if (goodsType == Constant.SOURCE_TYPE_JD) { + } else if (type == Constant.SOURCE_TYPE_JD) { // 鏆傛棤鍒嗙被 - } else if (goodsType == Constant.SOURCE_TYPE_PDD) { + } else if (type == Constant.SOURCE_TYPE_PDD) { // 鏆傛棤鍒嗙被 } @@ -102,7 +107,7 @@ * @param out */ @RequestMapping(value = "getNavGoodsList", method = RequestMethod.POST) - public void getNavContent(AcceptData acceptData, String key, Integer goodsType, Integer page, String cid, PrintWriter out) { + public void getNavContent(AcceptData acceptData, String key, Integer type, Integer page, String cid, PrintWriter out) { if (StringUtil.isNullOrEmpty(key)) { out.print(JsonUtil.loadFalseResult(1, "璇蜂紶鍏ey")); return; @@ -113,17 +118,22 @@ return; } - if (goodsType == null || goodsType == Constant.SOURCE_TYPE_TAOBAO) { + if (type == null) { + out.print(JsonUtil.loadFalseResult(1, "璇蜂紶鍏ョ被鍨�")); + return; + } + + if (type == Constant.SOURCE_TYPE_TAOBAO) { getListTB(acceptData, key, page, cid, out); return; } - if (goodsType == Constant.SOURCE_TYPE_JD) { + if (type == Constant.SOURCE_TYPE_JD) { getListJD(acceptData, key, page, cid, out); return; } - if (goodsType == Constant.SOURCE_TYPE_PDD) { + if (type == Constant.SOURCE_TYPE_PDD) { getListPDD(acceptData, key, page, cid, out); return; } -- Gitblit v1.8.0