管道基础大数据平台系统开发-【后端】-Server
1.5
13693261870
2023-01-05 e5f61db766b3eaa28506835e3581cbd2fdc8533d
src/main/java/com/lf/server/service/data/DownloadService.java
@@ -2,7 +2,7 @@
import com.lf.server.entity.ctrl.DownloadReqEntity;
import com.lf.server.entity.data.DownloadEntity;
import com.lf.server.entity.data.MetaFileEntity;
import com.lf.server.entity.data.MetaEntity;
import com.lf.server.entity.show.PipelineEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.helper.*;
@@ -184,7 +184,7 @@
     * @param pwd  密码
     * @return 下载文件GUID
     */
    public String zipFiles(UserEntity ue, List<MetaFileEntity> list, String pwd) throws Exception {
    public String zipFiles(UserEntity ue, List<MetaEntity> list, String pwd) throws Exception {
        rmRepeatMetaFiles(list);
        String downloadPath = pathHelper.getDownloadFullPath();
@@ -205,12 +205,12 @@
    /**
     * 移除重复的元数据文件
     */
    private void rmRepeatMetaFiles(List<MetaFileEntity> list) {
    private void rmRepeatMetaFiles(List<MetaEntity> list) {
        List<String> guidList = new ArrayList<>();
        int i = 0;
        while (i < list.size()) {
            MetaFileEntity entity = list.get(i);
            MetaEntity entity = list.get(i);
            if (guidList.contains(entity.getGuid())) {
                list.remove(i);
                continue;
@@ -224,11 +224,11 @@
    /**
     * 添加元数据文件至Zip包
     */
    private void addMetaFiles(ZipFile zip, ZipParameters params, List<MetaFileEntity> list) {
    private void addMetaFiles(ZipFile zip, ZipParameters params, List<MetaEntity> list) {
        String uploadPath = pathHelper.getConfig().getUploadPath();
        int i = 1;
        for (MetaFileEntity entity : list) {
        for (MetaEntity entity : list) {
            try {
                File file = new File(uploadPath + File.separator + entity.getPath());
                zip.addFile(file, params);