管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-06 f849c87a07300020dbef300c79d1eacfc1439f84
src/main/java/com/lf/server/controller/data/MetaController.java
@@ -97,6 +97,26 @@
    }
    @SysLog()
    @ApiOperation(value = "根据GUID查询GDB")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "guid", value = "GUID", dataType = "String", paramType = "query", example = "d58e66d9606a4b85e7c8ab43b3db0b55")
    })
    @GetMapping(value = "/selectGdbByGuid")
    public ResponseMsg<Object> selectGdbByGuid(String guid) {
        try {
            if (StringHelper.isEmpty(guid)) {
                return fail("文件GUID值不能为空", null);
            }
            List<MetaEntity> rs = metaService.selectGdbByGuid(guid);
            return success(null == rs ? 0 : rs.size(), rs);
        } catch (Exception ex) {
            return fail(ex, null);
        }
    }
    @SysLog()
    @ApiOperation(value = "根据父ID分页查询并返回记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "metaid", value = "父ID", dataType = "String", paramType = "query", example = "0"),
@@ -356,11 +376,11 @@
                return fail("用户未登录", null);
            }
            int count = downloadService.selectCountForUser(ue.getId(), 3, name);
            int count = downloadService.selectCountForUser(ue.getId(), "3,4", name);
            if (count == 0) {
                return success(0, null);
            }
            List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), 3, name, pageSize, pageSize * (pageIndex - 1));
            List<DownloadEntity> rs = downloadService.selectByPageForUser(ue.getId(), "3,4", name, pageSize, pageSize * (pageIndex - 1));
            return success(count, rs);
        } catch (Exception ex) {
@@ -386,7 +406,7 @@
                return success(new ArrayList<String>());
            }
            List<String> list = downloadService.selectMetaOverflowDep(ue, dr);
            List<String> list = metaService.selectMetaOverflowDep(ue, dr);
            return success(list);
        } catch (Exception ex) {
@@ -415,7 +435,7 @@
    }
    @SysLog()
    @ApiOperation(value = "请求下载")
    @ApiOperation(value = "请求元数据下载")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "dr", value = "请求下载实体类", dataType = "DownloadReqEntity", paramType = "body")
    })
@@ -436,13 +456,8 @@
                return fail("密码不符合要求");
            }
            List<MetaEntity> list = metaService.selectMetaFiles(dr.getIds());
            if (null == list || list.isEmpty()) {
                return fail("没有找到元数据");
            }
            UserEntity ue = tokenService.getCurrentUser(req);
            String guid = downloadService.zipFiles(ue, list, dr.getPwd());
            String guid = metaService.downloadMeteReq(ue, dr);
            return success(guid);
        } catch (Exception ex) {