From 46c315e26e20b1e6f255185d3a18834e2601c5b2 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 31 七月 2019 10:26:31 +0800 Subject: [PATCH] 商品推荐修改 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 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 46a2d20..e3cc4e2 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 @@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.yeshi.utils.JsonUtil; +import org.yeshi.utils.NumberUtil; import org.yeshi.utils.taobao.TbImgUtil; import com.google.gson.Gson; @@ -137,6 +138,11 @@ text = text.substring(1, end); } + if (NumberUtil.isNumeric(text)) { + out.println(JsonUtil.loadFalseResult("涓嶆敮鎸佺函鏁板瓧")); + return; + } + LogHelper.test("鏍规嵁绮樿创鏉挎帹鑽�:" + text); if (text.length() > 80) { @@ -204,7 +210,7 @@ tb.setImgList(new ArrayList<>()); tb.getImgList().add(0, TbImgUtil.getTBSize220Img(tb.getPictUrl())); } - data.put("tbImgs", tb.getImgList()); + data.put("imgs", tb.getImgList()); JSONObject root = new JSONObject(); root.put("type", 1); root.put("data", data); @@ -592,8 +598,7 @@ Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()) .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create(); for (JDGoods goods : goodsList) { - GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, null, fanLiRate, - shareRate); + GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, fanLiRate, shareRate); array.add(gson.toJson(goodsDetailVO)); } } @@ -605,7 +610,7 @@ } /** - * 浜笢 + * 鎷煎澶� * * @param kw * @param page @@ -669,8 +674,7 @@ BigDecimal shareRate = hongBaoManageService.getShareRate(); for (PDDGoodsDetail goods : goodsList) { - GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertPDDGoods(goods, null, fanLiRate, - shareRate); + GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertPDDGoods(goods, fanLiRate, shareRate); array.add(gson.toJson(goodsDetailVO)); } } -- Gitblit v1.8.0