From 692d4b07bb1186b811c2d895e5ad782c08441913 Mon Sep 17 00:00:00 2001 From: huliguo <2023611923@qq.com> Date: 星期三, 02 七月 2025 18:32:18 +0800 Subject: [PATCH] swagger --- src/main/java/com/linghu/controller/TypeController.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/linghu/controller/TypeController.java b/src/main/java/com/linghu/controller/TypeController.java index 64c3203..ef03c95 100644 --- a/src/main/java/com/linghu/controller/TypeController.java +++ b/src/main/java/com/linghu/controller/TypeController.java @@ -5,6 +5,8 @@ import com.linghu.model.common.ResponseResult; import com.linghu.model.entity.Type; import com.linghu.service.TypeService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -12,12 +14,14 @@ @RestController @RequestMapping("/type") +@Api(value = "类型相关接口", tags = "设置-类型") public class TypeController { @Autowired private TypeService typeService; @PostMapping + @ApiOperation(value = "添加类型") public ResponseResult<Type> add(@RequestBody Type type) { type.setDelFlag(0); boolean success = typeService.save(type); -- Gitblit v1.7.1