puzhibing
2024-12-10 fb6eee80334ae23a2eca8c37baeef05e86c919ed
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(){