From 0922bfdb56bc30125d6fc8e13c50cdda7cd9dc72 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 09 九月 2019 18:59:52 +0800 Subject: [PATCH] 提现自动绑定修改 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java index c66afa5..465af3a 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java @@ -623,6 +623,7 @@ private void searchJDGoods(String key, Integer page, String filter, Integer order, PrintWriter out) { JDSearchResult result = null; + boolean hasCoupon = false; String way = configService.get("jd_api_search_key"); if ("1".equals(way)) { JDFilter filterAPI = new JDFilter(); @@ -658,6 +659,7 @@ JSONObject jsonfilter = JSONObject.fromObject(filter); Boolean coupon = jsonfilter.optBoolean("coupon"); if (coupon != null && coupon) { + hasCoupon = true; filterAPI.setIsCoupon(1); // 鏈夊埜 } @@ -713,6 +715,7 @@ JSONObject jsonfilter = JSONObject.fromObject(filter); Boolean coupon = jsonfilter.optBoolean("coupon"); if (coupon != null && coupon) { + hasCoupon = true; jdfilter.setHasCoupon(1); // 鏈夊埜 } @@ -765,7 +768,13 @@ .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create(); for (JDGoods goods : goodsList) { GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, fanLiRate, shareRate); - array.add(gson.toJson(goodsDetailVO)); + if (hasCoupon) { + if (goodsDetailVO.isHasCoupon()) { + array.add(gson.toJson(goodsDetailVO)); + } + } else { + array.add(gson.toJson(goodsDetailVO)); + } } } } -- Gitblit v1.8.0