管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-02-27 cec8c5738686bd16d17ae37455b85069e6babe29
src/main/java/com/lf/server/controller/show/ExportController.java
@@ -45,14 +45,14 @@
    DownloadService downloadService;
    @SysLog()
    @ApiOperation(value = "分页查询")
    @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")
    })
    @GetMapping(value = "/selectByPage")
    public ResponseMsg<List<DownloadEntity>> selectByPage(String name, Integer pageSize, Integer pageIndex, HttpServletRequest req) {
    public ResponseMsg<List<DownloadEntity>> selectPageCountForDownload(String name, Integer pageSize, Integer pageIndex, HttpServletRequest req) {
        try {
            if (pageSize < 1 || pageIndex < 1) {
                return fail("每页页数或分页数小于1", null);
@@ -63,15 +63,15 @@
                return fail("用户未登录", null);
            }
            int count = downloadService.selectCountForUser(ue.getCreateUser(), 2, name);
            int count = downloadService.selectCountForUser(ue.getId(), 2, name);
            if (count == 0) {
                return success(0, null);
            }
            List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getCreateUser(), 2, name, pageSize, pageSize * (pageIndex - 1));
            List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), 2, name, pageSize, pageSize * (pageIndex - 1));
            return success(count, rs);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
            return fail(ex, null);
        }
    }
@@ -104,7 +104,7 @@
            return success("出图成功", str);
        } catch (Exception ex) {
            return fail(ex.getMessage());
            return fail(ex, null);
        }
    }