From 42128cb41c46b240f18f4aa132c142db0138b3ed Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 17 十月 2022 17:53:49 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/controller/sys/MenuAuthController.java | 40 ++++++++++++++++++++++++++++++++++------ 1 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/lf/server/controller/sys/MenuAuthController.java b/src/main/java/com/lf/server/controller/sys/MenuAuthController.java index 9852bd4..a4e8631 100644 --- a/src/main/java/com/lf/server/controller/sys/MenuAuthController.java +++ b/src/main/java/com/lf/server/controller/sys/MenuAuthController.java @@ -95,6 +95,34 @@ } @SysLog() + @ApiOperation(value = "鏍规嵁瑙掕壊ID+鑿滃崟ID鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleid", value = "瑙掕壊ID", dataType = "Integer", paramType = "query", example = "1"), + @ApiImplicitParam(name = "menuid", value = "鑿滃崟ID", dataType = "Integer", paramType = "query", example = "1"), + @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10"), + @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1") + }) + @GetMapping(value = "/selectByPageForRole") + public ResponseMsg<List<MenuAuthEntity>> selectByPageForRole(Integer roleid, Integer menuid, Integer pageSize, Integer pageIndex) { + try { + if (pageSize < 1 || pageIndex < 1) { + return fail("姣忛〉椤垫暟鎴栧垎椤垫暟灏忎簬1", null); + } + + int count = menuAuthService.selectCountForRole(roleid, menuid); + if (count == 0) { + return success(0, null); + } + + List<MenuAuthEntity> rs = menuAuthService.selectByPageForRole(roleid, menuid, pageSize, pageSize * (pageIndex - 1)); + + return success(count, rs); + } catch (Exception ex) { + return fail(ex.getMessage(), null); + } + } + + @SysLog() @ApiOperation(value = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectAll") public ResponseMsg<List<MenuAuthEntity>> selectAll() { @@ -124,7 +152,7 @@ } @SysLog() - @ApiOperation(value = "娣诲姞鏁版嵁") + @ApiOperation(value = "鎻掑叆涓�鏉�") @ApiImplicitParams({ @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MenuAuthEntity", paramType = "body") }) @@ -145,7 +173,7 @@ } @SysLog() - @ApiOperation(value = "鎵归噺娣诲姞") + @ApiOperation(value = "鎻掑叆澶氭潯") @ApiImplicitParams({ @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MenuAuthEntity", paramType = "body") }) @@ -168,7 +196,7 @@ } @SysLog() - @ApiOperation(value = "鍒櫎鏁版嵁") + @ApiOperation(value = "鍒犻櫎涓�鏉�") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") }) @@ -184,7 +212,7 @@ } @SysLog() - @ApiOperation(value = "鎵归噺鍒犻櫎") + @ApiOperation(value = "鍒犻櫎澶氭潯") @ApiImplicitParams({ @ApiImplicitParam(name = "ids", value = "ID鏁扮粍", dataType = "Integer", paramType = "query", example = "1,2") }) @@ -204,7 +232,7 @@ } @SysLog() - @ApiOperation(value = "淇敼鏁版嵁") + @ApiOperation(value = "鏇存柊涓�鏉�") @ApiImplicitParams({ @ApiImplicitParam(name = "entity", value = "瀹炰綋绫�", dataType = "MenuAuthEntity", paramType = "body") }) @@ -226,7 +254,7 @@ } @SysLog() - @ApiOperation(value = "鎵归噺淇敼") + @ApiOperation(value = "鏇存柊澶氭潯") @ApiImplicitParams({ @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MenuAuthEntity", paramType = "body") }) -- Gitblit v1.9.3