From b7493531ba6ea0fcd4efebfe40ff907a73d27391 Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Sun, 1 Apr 2018 10:34:13 +0800 Subject: [PATCH] =?UTF-8?q?update[litemall-wx-api]:=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=95=86=E5=93=81=E6=97=B6=E8=BF=94=E5=9B=9E=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=89=80=E5=B1=9E=E7=B1=BB=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../linlinjava/litemall/wx/web/WxGoodsController.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxGoodsController.java b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxGoodsController.java index 8f90e8b9..2e7e30ab 100644 --- a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxGoodsController.java +++ b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxGoodsController.java @@ -186,8 +186,19 @@ public class WxGoodsController { List goodsList = goodsService.querySelective(categoryId, brandId, keyword, isHot, isNew, page, size, sortWithOrder); int total = goodsService.countSelective(categoryId, brandId, keyword, isHot, isNew, page, size, sortWithOrder); + List cats = new ArrayList(); + for(LitemallGoods goods : goodsList){ + cats.add(goods.getCategoryId()); + } + + List categoryList = null; + if(cats.size() != 0) { + categoryList = categoryService.queryL2ByIds(cats); + } + Map data = new HashMap(); data.put("goodsList", goodsList); + data.put("filterCategory", categoryList); data.put("count", total); return ResponseUtil.ok(data); }