From ee1d39f11b9483b64a88029f1755a6e7166fea15 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期日, 26 四月 2020 16:49:21 +0800 Subject: [PATCH] 等级显示问题 --- fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsAdminController.java | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsAdminController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsAdminController.java index be58ce0..3b3fcde 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsAdminController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsAdminController.java @@ -93,7 +93,6 @@ shopGoods.setGoodsClass(banLiShopGoodsClassService.selectByPrimaryKey(goodsClass.getId())); } } - long count = banLiShopGoodsService.countGoods(key, state); @@ -144,4 +143,25 @@ JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鍒犻櫎澶辫触")); } } + + + /** + * 淇敼鐘舵�� + * @param callback + * @param id + * @param out + */ + @RequestMapping(value = "switchState") + public void switchState(String callback, Long id, PrintWriter out) { + try { + banLiShopGoodsService.switchState(id); + JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("鎿嶄綔鎴愬姛")); + } catch (BanLiShopGoodsException e) { + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg())); + } catch (Exception e) { + JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎿嶄綔澶辫触")); + e.printStackTrace(); + } + } + } -- Gitblit v1.8.0