From fb6eee80334ae23a2eca8c37baeef05e86c919ed Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 10 十二月 2024 17:09:00 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java index 7864100..8b38be4 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java @@ -34,14 +34,14 @@ @PostMapping("/addGoodsCategory") @ApiOperation(value = "添加商品分类", tags = {"管理后台-商品分类"}) - public R<Void> addGoodsCategory(GoodsCategory goodsCategory){ + public R<Void> addGoodsCategory(@RequestBody GoodsCategory goodsCategory){ goodsCategoryService.save(goodsCategory); return R.ok(); } @PutMapping("/updateGoodsCategory") @ApiOperation(value = "修改商品分类", tags = {"管理后台-商品分类"}) - public R<Void> updateGoodsCategory(GoodsCategory goodsCategory){ + public R<Void> updateGoodsCategory(@RequestBody GoodsCategory goodsCategory){ goodsCategoryService.updateById(goodsCategory); return R.ok(); } @@ -62,6 +62,16 @@ return R.ok(page); } + @DeleteMapping("/delete") + @ApiOperation(value = "删除商品分类", tags = {"管理后台-商品分类"}) + public R<Void> delete(@RequestParam("id") Integer id){ + goodsCategoryService.removeById(id); + return R.ok(); + } + + + + @GetMapping("/index/list") @ApiOperation(value = "商品分类", tags = {"小程序-首页"}) public R<List<GoodsCategory>> indexlist(){ -- Gitblit v1.7.1