From b8712ac91f36e0d4a15ea3a623342af5368c898c Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 26 九月 2022 18:02:24 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/controller/data/DictController.java | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/lf/server/controller/data/DictController.java b/src/main/java/com/lf/server/controller/data/DictController.java index 0ee3e89..375a857 100644 --- a/src/main/java/com/lf/server/controller/data/DictController.java +++ b/src/main/java/com/lf/server/controller/data/DictController.java @@ -3,6 +3,10 @@ import com.lf.server.entity.data.DictEntity; import com.lf.server.service.data.DictService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -13,18 +17,28 @@ * @author sws * @date 2022-09.26 */ - +@Api(tags = "DictController", description = "瀛楀吀绠$悊") @RestController @RequestMapping("/Dict") public class DictController { @Autowired DictService dictService; + @ApiOperation(value = "鏌ヨ璁板綍鏁�", notes = "鏌ヨ璁板綍鏁�") + @ApiImplicitParams({ + @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", required = false, example = "sys_dict") + }) @GetMapping({"/selectCount"}) public Integer selectCount(String tab) { return dictService.selectCount(tab); } + @ApiOperation(value = "鍒嗛〉鏌ヨ", notes = "鍒嗛〉鏌ヨ") + @ApiImplicitParams({ + @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", required = false, example = "sys_dict"), + @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10"), + @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉绱㈠紩锛堜粠0寮�濮嬶級", dataType = "Integer", paramType = "query", example = "0") + }) @GetMapping(value = "/selectByPage") public List<DictEntity> selectByPage(String tab, Integer pageSize, Integer pageIndex) { if (pageSize < 1 || pageIndex < 0) { -- Gitblit v1.9.3