From 2cd8f35436fd324431f1ae78196f8140ecb3d8b0 Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期四, 14 十一月 2024 11:25:11 +0800 Subject: [PATCH] Merge branch '视频专网' of http://42.193.1.25:9521/r/~qirong/qyspzw into 视频专网 --- ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 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..c5a32aa 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; @@ -31,6 +32,7 @@ import java.util.HashMap; import java.util.List; +@Slf4j @Component public class VideoPulSync { @@ -47,11 +49,15 @@ @Scheduled(cron = "0 0/1 * * * ?") public void get() throws IOException { System.out.println("鍚屾涓婁紶......"); - + log.info("鍚屾涓婁紶"); List<String> list = FtpApche.downloadList(ftpConfig); + if(list.size() == 0){ + log.error("no files in ftp"); + System.out.println("ftp get 0 fileinfo"); return; } + System.out.println("ftp get all fileinfo锛�" + list.get(0)); for (String str : list) { String password = str.substring(0, 6); String fileName = str.substring(6, str.length()); -- Gitblit v1.8.0