yujian
2020-05-09 7e7db2fa55a9a3af46d4fd8ede0dee147f101d64
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();
      }
   }
}