管道基础大数据平台系统开发-【后端】-Server
11
13693261870
2022-12-21 6355ba4d8a6edc7afb125063ddbe89126a1af784
src/main/java/com/lf/server/controller/all/BaseQueryController.java
@@ -225,6 +225,33 @@
    }
    @SysLog()
    @ApiOperation(value = "根据表名分页查询表")
    @GetMapping(value = "/selectTabsByPage")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "tab", value = "表名", dataType = "String", paramType = "query", example = "dlg_"),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"),
            @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1")
    })
    public ResponseMsg<List<TabEntity>> selectTabsByPage(String tab, Integer pageSize, Integer pageIndex) {
        try {
            if (pageSize < 1 || pageIndex < 1) {
                return fail("每页页数或分页数小于1", null);
            }
            int count = baseQueryService.selectTabsForCount(tab);
            if (count == 0) {
                return success(0, null);
            }
            List<TabEntity> rs = baseQueryService.selectTabsByPage(tab, pageSize, pageSize * (pageIndex - 1));
            return success(count, rs);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "查询字段信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "映射名称", dataType = "String", paramType = "query", example = "dlg25wAanp")