From b8d62de41ff7e1e0549061308aa11f68cf881ed9 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 16 七月 2025 17:01:20 +0800 Subject: [PATCH] 修改所有的controller --- se-system/src/main/java/com/terra/system/controller/data/MetaController.java | 161 +++++++++++++++++++++++++++-------------------------- 1 files changed, 83 insertions(+), 78 deletions(-) diff --git a/se-system/src/main/java/com/terra/system/controller/data/MetaController.java b/se-system/src/main/java/com/terra/system/controller/data/MetaController.java index da30c27..31b97a5 100644 --- a/se-system/src/main/java/com/terra/system/controller/data/MetaController.java +++ b/se-system/src/main/java/com/terra/system/controller/data/MetaController.java @@ -26,8 +26,13 @@ import com.terra.system.service.sys.DepService; import com.terra.system.service.sys.DownlogService; import com.terra.system.service.sys.TokenService; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -42,7 +47,7 @@ * 鍏冩暟鎹� * @author WWW */ -@Api(tags = "鏁版嵁绠$悊\\淇℃伅绠$悊") +@Tag(name = "鏁版嵁绠$悊\\淇℃伅绠$悊") @RestController @RequestMapping("/meta") public class MetaController extends BaseController { @@ -71,14 +76,14 @@ CadService cadService; @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "depcode", value = "鍗曚綅缂栫爜", dataType = "String", paramType = "query", example = "00"), - @ApiImplicitParam(name = "dircode", value = "鐩綍缂栫爜", dataType = "String", paramType = "query", example = "00"), - @ApiImplicitParam(name = "verid", value = "鐗堟湰ID", dataType = "Integer", paramType = "query", example = "0"), - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = ""), - @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10"), - @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") + @Parameters({ + @Parameter(name = "depcode", description = "鍗曚綅缂栫爜", in = ParameterIn.QUERY, example = "00"), + @Parameter(name = "dircode", description = "鐩綍缂栫爜", in = ParameterIn.QUERY, example = "00"), + @Parameter(name = "verid", description = "鐗堟湰ID", in = ParameterIn.QUERY, example = "0"), + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = ""), + @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10"), + @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectByPageAndCount") public ResponseMsg<List<MetaEntity>> selectByPageAndCount(String depcode, String dircode, Integer verid, String name, Integer pageSize, Integer pageIndex) { @@ -101,9 +106,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁GUID鏌ヨGDB") - @ApiImplicitParams({ - @ApiImplicitParam(name = "guid", value = "GUID", dataType = "String", paramType = "query", example = "d58e66d9606a4b85e7c8ab43b3db0b55") + @Operation(summary = "鏍规嵁GUID鏌ヨGDB") + @Parameters({ + @Parameter(name = "guid", description = "GUID", in = ParameterIn.QUERY, example = "d58e66d9606a4b85e7c8ab43b3db0b55") }) @GetMapping(value = "/selectGdbByGuid") public ResponseMsg<Object> selectGdbByGuid(String guid) { @@ -121,12 +126,12 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鐖禝D鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") - @ApiImplicitParams({ - @ApiImplicitParam(name = "metaid", value = "鐖禝D", dataType = "String", paramType = "query", example = "0"), - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = ""), - @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10"), - @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "鏍规嵁鐖禝D鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") + @Parameters({ + @Parameter(name = "metaid", description = "鐖禝D", in = ParameterIn.QUERY, example = "0"), + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = ""), + @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10"), + @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectPageAndCountByPid") public ResponseMsg<List<MetaEntity>> selectPageAndCountByPid(Integer metaid, String name, Integer pageSize, Integer pageIndex) { @@ -152,9 +157,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鐩綍ID鏌ヨ鐗堟湰鍒楄〃") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dirid", value = "鐩綍ID", dataType = "Integer", paramType = "query") + @Operation(summary = "鏍规嵁鐩綍ID鏌ヨ鐗堟湰鍒楄〃") + @Parameters({ + @Parameter(name = "dirid", description = "鐩綍ID", in = ParameterIn.QUERY) }) @GetMapping(value = "/selectVerByDirid") public ResponseMsg<List<VerEntity>> selectVerByDirid(Integer dirid) { @@ -175,9 +180,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁ID鏌ヨ") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") + @Operation(summary = "鏍规嵁ID鏌ヨ") + @Parameters({ + @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectById") public ResponseMsg<MetaEntity> selectById(int id) { @@ -191,11 +196,11 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ琛ㄤ腑鏁版嵁") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鍏冩暟鎹甀D", dataType = "Integer", paramType = "query", example = "115"), - @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1"), - @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10") + @Operation(summary = "鏌ヨ琛ㄤ腑鏁版嵁") + @Parameters({ + @Parameter(name = "id", description = "鍏冩暟鎹甀D", in = ParameterIn.QUERY, example = "115"), + @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1"), + @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10") }) @GetMapping(value = "/selectDbData") public ResponseMsg<Object> selectDbData(Integer id, Integer pageIndex, Integer pageSize) { @@ -230,10 +235,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ瀛楁淇℃伅") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ns", value = "鍚嶇О绌洪棿", dataType = "String", paramType = "query", example = "bd"), - @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "dlg25wAanp") + @Operation(summary = "鏌ヨ瀛楁淇℃伅") + @Parameters({ + @Parameter(name = "ns", description = "鍚嶇О绌洪棿", in = ParameterIn.QUERY, example = "bd"), + @Parameter(name = "tab", description = "琛ㄥ悕", in = ParameterIn.QUERY, example = "dlg25wAanp") }) @GetMapping(value = "/selectTabFields") public ResponseMsg<List<DictEntity>> selectTabFields(String ns, String tab) { @@ -251,10 +256,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨDwg杞崲") - @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "鍏冩暟鎹甀D", dataType = "int", paramType = "query", example = "7715"), - @ApiImplicitParam(name = "isAttach", value = "鏄惁涓洪檮浠�", dataType = "Boolean", paramType = "query", example = "false") + @Operation(summary = "鏌ヨDwg杞崲") + @Parameters({ + @Parameter(name = "id", description = "鍏冩暟鎹甀D", in = ParameterIn.QUERY, example = "7715"), + @Parameter(name = "isAttach", description = "鏄惁涓洪檮浠�", in = ParameterIn.QUERY, example = "false") }) @GetMapping(value = "/selectConvertToDwg") public ResponseMsg<Object> selectConvertToDwg(int id, Boolean isAttach) { @@ -268,9 +273,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MetaEntity", paramType = "body") + @Operation(summary = "鎻掑叆涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insert(@RequestBody MetaEntity entity, HttpServletRequest req) { @@ -290,9 +295,9 @@ } @SysLog() - @ApiOperation(value = "鎻掑叆澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MetaEntity", paramType = "body") + @Operation(summary = "鎻掑叆澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> inserts(@RequestBody List<MetaEntity> list, HttpServletRequest req) { @@ -313,9 +318,9 @@ } @SysLog() - @ApiOperation(value = "鍒犻櫎澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "Integer", paramType = "query", allowMultiple = true, example = "1") + @Operation(summary = "鍒犻櫎澶氭潯") + @Parameters({ + @Parameter(name = "ids", description = "ID鏁扮粍", in = ParameterIn.QUERY, schema = @Schema(type = "array"), example = "1") }) @GetMapping(value = "/deletes") public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { @@ -333,9 +338,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊涓�鏉�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MetaEntity", paramType = "body") + @Operation(summary = "鏇存柊涓�鏉�") + @Parameters({ + @Parameter(name = "entity", description = "瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") @@ -355,9 +360,9 @@ } @SysLog() - @ApiOperation(value = "鏇存柊澶氭潯") - @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MetaEntity", paramType = "body") + @Operation(summary = "鏇存柊澶氭潯") + @Parameters({ + @Parameter(name = "list", description = "瀹炰綋绫婚泦鍚�") }) @ResponseBody @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") @@ -379,11 +384,11 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ涓嬭浇鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = ""), - @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10"), - @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1") + @Operation(summary = "鍒嗛〉鏌ヨ涓嬭浇鏂囦欢") + @Parameters({ + @Parameter(name = "name", description = "鍚嶇О", in = ParameterIn.QUERY, example = ""), + @Parameter(name = "pageSize", description = "姣忛〉鏉℃暟", in = ParameterIn.QUERY, example = "10"), + @Parameter(name = "pageIndex", description = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", in = ParameterIn.QUERY, example = "1") }) @GetMapping(value = "/selectPageCountForDownload") public ResponseMsg<List<DownloadEntity>> selectPageCountForDownload(String name, Integer pageSize, Integer pageIndex, HttpServletRequest req) { @@ -410,9 +415,9 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ鍏冩暟鎹腑婧㈠嚭鐨勫崟浣岻D") - @ApiImplicitParams({ - @ApiImplicitParam(name = "reqEntity", value = "璇锋眰涓嬭浇瀹炰綋", dataType = "DownloadReqEntity", paramType = "body") + @Operation(summary = "鏌ヨ鍏冩暟鎹腑婧㈠嚭鐨勫崟浣岻D") + @Parameters({ + @Parameter(name = "reqEntity", description = "璇锋眰涓嬭浇瀹炰綋") }) @ResponseBody @PostMapping(value = "/selectMetaOverflowDep") @@ -436,9 +441,9 @@ } @SysLog() - @ApiOperation(value = "鏍规嵁鍗曚綅缂栫爜鏁扮粍鏌ヨ鍗曚綅") - @ApiImplicitParams({ - @ApiImplicitParam(name = "codes", value = "鍗曚綅缂栫爜鏁扮粍", dataType = "String", paramType = "query", allowMultiple = true, example = "00,0001") + @Operation(summary = "鏍规嵁鍗曚綅缂栫爜鏁扮粍鏌ヨ鍗曚綅") + @Parameters({ + @Parameter(name = "codes", description = "鍗曚綅缂栫爜鏁扮粍", in = ParameterIn.QUERY, schema = @Schema(type = "array"), example = "00,0001") }) @GetMapping(value = "/selectDepsByCodes") public ResponseMsg<Object> selectDepsByCodes(String[] codes) { @@ -456,9 +461,9 @@ } @SysLog() - @ApiOperation(value = "璇锋眰鍏冩暟鎹笅杞�") - @ApiImplicitParams({ - @ApiImplicitParam(name = "dr", value = "璇锋眰涓嬭浇瀹炰綋绫�", dataType = "DownloadReqEntity", paramType = "body") + @Operation(summary = "璇锋眰鍏冩暟鎹笅杞�") + @Parameters({ + @Parameter(name = "dr", description = "璇锋眰涓嬭浇瀹炰綋绫�") }) @ResponseBody @PostMapping(value = "/downloadReq") @@ -487,10 +492,10 @@ } @SysLog() - @ApiOperation(value = "鏌ヨ涓嬭浇鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "guid", value = "鏂囦欢GUID", dataType = "String", paramType = "query"), - @ApiImplicitParam(name = "pwd", value = "瀵嗙爜", dataType = "String", paramType = "query") + @Operation(summary = "鏌ヨ涓嬭浇鏂囦欢") + @Parameters({ + @Parameter(name = "guid", description = "鏂囦欢GUID", in = ParameterIn.QUERY), + @Parameter(name = "pwd", description = "瀵嗙爜", in = ParameterIn.QUERY) }) @GetMapping(value = "/selectDownloadFile") public ResponseMsg<Boolean> selectDownloadFile(String guid, String pwd) { @@ -525,10 +530,10 @@ } @SysLog() - @ApiOperation(value = "涓嬭浇鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "guid", value = "鏂囦欢GUID", dataType = "String", paramType = "query"), - @ApiImplicitParam(name = "pwd", value = "瀵嗙爜", dataType = "String", paramType = "query") + @Operation(summary = "涓嬭浇鏂囦欢") + @Parameters({ + @Parameter(name = "guid", description = "鏂囦欢GUID", in = ParameterIn.QUERY), + @Parameter(name = "pwd", description = "瀵嗙爜", in = ParameterIn.QUERY) }) @ResponseBody @GetMapping(value = "/downloadFile") @@ -566,9 +571,9 @@ } @SysLog() - @ApiOperation(value = "鏌ョ湅鏂囦欢") - @ApiImplicitParams({ - @ApiImplicitParam(name = "guid", value = "闄勪欢Guid", dataType = "String", paramType = "body") + @Operation(summary = "鏌ョ湅鏂囦欢") + @Parameters({ + @Parameter(name = "guid", description = "闄勪欢Guid") }) @GetMapping(value = "/downloadForView") public void downloadForView(String guid, HttpServletResponse res) { -- Gitblit v1.9.3