From 3e881345e5e8753c0886407a98bff8da9ae54f76 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期一, 17 二月 2025 09:55:13 +0800 Subject: [PATCH] 还原 --- ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java index 2dba841..e57afd1 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import lombok.extern.slf4j.Slf4j; import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.utils.DateUtils; import org.dromara.common.oss.core.OssClient; @@ -22,6 +23,7 @@ import org.springframework.mock.web.MockMultipartFile; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; import org.springframework.web.multipart.MultipartFile; import java.io.IOException; @@ -30,7 +32,9 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Objects; +@Slf4j @Component public class VideoPulSync { @@ -46,12 +50,10 @@ @Scheduled(cron = "0 0/1 * * * ?") public void get() throws IOException { - System.out.println("鍚屾涓婁紶......"); - - List<String> list = FtpApche.downloadList(ftpConfig); - if(list.size() == 0){ + log.error("鍚屾浜掕仈缃戞枃浠�"); + List<String> list = FtpApche.downloadList(this.ftpConfig); + if (list.size() == 0) return; - } for (String str : list) { String password = str.substring(0, 6); String fileName = str.substring(6, str.length()); @@ -63,7 +65,6 @@ FtpApche.deleteFile(str); buildResultEntity(fileName, fileName.substring(14, fileName.length()), "minio", uploadResult, (MultipartFile)mockMultipartFile, password, fileBytesByName); } - } @NotNull -- Gitblit v1.8.0