From 0c8cd957630d43aa71183d34ecb1faf60689f8a4 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 18 十二月 2024 11:30:15 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/controller/data/DirController.java | 38 +++++++++++++++++++++++++++++++++++--- 1 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/lf/server/controller/data/DirController.java b/src/main/java/com/lf/server/controller/data/DirController.java index 45f0410..7444279 100644 --- a/src/main/java/com/lf/server/controller/data/DirController.java +++ b/src/main/java/com/lf/server/controller/data/DirController.java @@ -37,7 +37,7 @@ @SysLog() @ApiOperation(value = "鎻掑叆涓�鏉�") @ApiImplicitParams({ - @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") + @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "DirEntity", paramType = "body", example = "") }) @PostMapping(value = "/insertDir", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertDir(@RequestBody DirEntity entity, HttpServletRequest req) { @@ -58,7 +58,7 @@ @SysLog() @ApiOperation(value = "鎻掑叆澶氭潯") @ApiImplicitParams({ - @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") + @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "DirEntity", paramType = "body", example = "") }) @PostMapping(value = "/insertDirs", produces = "application/json; charset=UTF-8") public ResponseMsg<Integer> insertDirs(@RequestBody List<DirEntity> list, HttpServletRequest req) { @@ -95,7 +95,7 @@ @SysLog() @ApiOperation(value = "鍒犻櫎澶氭潯") @ApiImplicitParams({ - @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") + @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "DirEntity", paramType = "body", example = "") }) @GetMapping(value = "/deleteDirs") public ResponseMsg<Integer> deleteDirs(@RequestParam List<Integer> ids) { @@ -209,4 +209,36 @@ log.error(ex.getMessage(), ex); } } + + @SysLog() + @ApiOperation(value = "鏌ヨ椤圭洰") + @ApiImplicitParams({ + @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "瑗�") + }) + @GetMapping(value = "/selectProject") + public ResponseMsg<List<DirEntity>> selectProject(String name) { + try { + List<DirEntity> list = dirService.selectProject(name); + + return success(list); + } catch (Exception ex) { + return fail(ex, null); + } + } + + @SysLog() + @ApiOperation(value = "閫掑綊鏌ヨ") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pid", value = "鐖禝D", dataType = "Integer", paramType = "query", example = "1") + }) + @GetMapping(value = "/selectByPid") + public ResponseMsg<List<DirEntity>> selectByPid(int pid) { + try { + List<DirEntity> list = dirService.selectByPid(pid); + + return success(list); + } catch (Exception ex) { + return fail(ex, null); + } + } } -- Gitblit v1.9.3