管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-13 e8a5942bd0ac1188281cda29c882bb0e107896dc
src/main/java/com/lf/server/controller/sys/AuthController.java
@@ -96,6 +96,33 @@
    }
    @SysLog()
    @ApiOperation(value = "根据菜单分页查询并返回记录数")
    @ApiImplicitParams({
            @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 = "/selectByPageForMenu")
    public ResponseMsg<List<AuthEntity>> selectByPageForMenu(Integer menuid, Integer pageSize, Integer pageIndex) {
        try {
            if (pageSize < 1 || pageIndex < 1) {
                return fail("每页页数或分页数小于1", null);
            }
            int count = authService.selectCountForMenu(menuid);
            if (count == 0) {
                return success(0, null);
            }
            List<AuthEntity> rs = authService.selectByPageForMenu(menuid, pageSize, pageSize * (pageIndex - 1));
            return success(count, rs);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "插入一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.AuthEntity", paramType = "body", example = "")