From f90bedcf2666d93ad4889f265fd678e4f36f4842 Mon Sep 17 00:00:00 2001 From: xyiege Date: Wed, 12 Oct 2022 22:08:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8B=BC=E5=86=99=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chjyj/szwh/controller/admin/AdminGoodsController.java | 2 +- src/main/java/cn/chjyj/szwh/service/GoodsService.java | 2 +- .../java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/cn/chjyj/szwh/controller/admin/AdminGoodsController.java b/src/main/java/cn/chjyj/szwh/controller/admin/AdminGoodsController.java index 1fa49cf..28b0027 100644 --- a/src/main/java/cn/chjyj/szwh/controller/admin/AdminGoodsController.java +++ b/src/main/java/cn/chjyj/szwh/controller/admin/AdminGoodsController.java @@ -169,7 +169,7 @@ public class AdminGoodsController extends BaseController { JSONObject request=JSONObject.parseObject(rejson); String type = request.getString("type"); int itype = Integer.valueOf(type); - List retlist = goodsService.getMapDataByTyep(itype); + List retlist = goodsService.getMapDataByType(itype); jsonObject.put("data",retlist); jsonObject.put("code",200); jsonObject.put("msg","成功"); diff --git a/src/main/java/cn/chjyj/szwh/service/GoodsService.java b/src/main/java/cn/chjyj/szwh/service/GoodsService.java index 25f2170..0748301 100644 --- a/src/main/java/cn/chjyj/szwh/service/GoodsService.java +++ b/src/main/java/cn/chjyj/szwh/service/GoodsService.java @@ -35,7 +35,7 @@ public interface GoodsService { * @param type * @return */ - List getMapDataByTyep(int type); + List getMapDataByType(int type); /** * 按照对象查询指定数量的记录 diff --git a/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java b/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java index 585e1d7..2976ba9 100644 --- a/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java +++ b/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java @@ -92,7 +92,7 @@ public class GoodsServiceImpl implements GoodsService { * @return */ @Override - public List getMapDataByTyep(int type) { + public List getMapDataByType(int type) { Map retmap = new HashMap(); String order = "";//排序条件 @@ -450,6 +450,12 @@ public class GoodsServiceImpl implements GoodsService { return retmap; } + /** + * 处理排序问题 + * @param goodsIsli + * @param type + * @return + */ @Override public int ranksort(String goodsIsli, int type) { int ret = 0;