From 01d6fa48a0de7a21988e89f71721b6b85e53b517 Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期四, 06 三月 2025 16:33:53 +0800 Subject: [PATCH] 去掉资讯图片必填限制 --- ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtGoodsCategoryController.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtGoodsCategoryController.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtGoodsCategoryController.java index df111a8..4c2c335 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtGoodsCategoryController.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtGoodsCategoryController.java @@ -9,6 +9,7 @@ import com.ruoyi.goods.service.IGoodsCategoryService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; @@ -31,7 +32,7 @@ @RestController @RequiredArgsConstructor @RequestMapping("/mgt/goods-category") -@Api(value = "管理后台商品分类相关接口", tags = {"管理后台接口"}) +@Api(value = "管理后台商品分类相关接口", tags = {"管理后台-商品分类相关接口"}) public class MgtGoodsCategoryController { private final IGoodsCategoryService goodsCategoryService; @@ -70,8 +71,9 @@ */ @ApiOperation(value = "删除商品分类", notes = "删除商品分类") @DeleteMapping("/{id}") - public R<Void> deleteGoodsCategory(@Validated @PathVariable("id") Long id) { - goodsCategoryService.removeById(id); + public R<Void> deleteGoodsCategory( + @ApiParam(name = "id", value = "商品分类id", required = true) @Validated @PathVariable("id") Long id) { + goodsCategoryService.delete(id); return R.ok(); } } -- Gitblit v1.7.1