瀏覽代碼

【CHG】增加日志

ZhaoMn 3 年之前
父節點
當前提交
b5a52662ed

+ 4 - 0
railway-business/src/main/java/com/railway/business/safetool/service/impl/BaseSafetyToolServiceImpl.java

@@ -23,6 +23,7 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
 import java.util.zip.ZipException;
 import java.util.zip.ZipException;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -34,6 +35,7 @@ import org.springframework.transaction.annotation.Transactional;
  * @author wuhonghao
  * @author wuhonghao
  * @date 2021/12/01
  * @date 2021/12/01
  */
  */
+@Slf4j
 @Service
 @Service
 public class BaseSafetyToolServiceImpl implements IBaseSafetyToolService {
 public class BaseSafetyToolServiceImpl implements IBaseSafetyToolService {
 
 
@@ -160,6 +162,7 @@ public class BaseSafetyToolServiceImpl implements IBaseSafetyToolService {
     if(tools.size() == 1){
     if(tools.size() == 1){
       BaseSafetyTool tool = tools.get(0);
       BaseSafetyTool tool = tools.get(0);
       String fileName = tool.getToolCode() + ".jpg";
       String fileName = tool.getToolCode() + ".jpg";
+      log.info("{} - {}", fileName, tool.getQcodeUrl());
       return AjaxResult.uploadFile(tool.getQcodeUrl(), fileName);
       return AjaxResult.uploadFile(tool.getQcodeUrl(), fileName);
     }
     }
     // 如果多条,打包压缩后发
     // 如果多条,打包压缩后发
@@ -184,6 +187,7 @@ public class BaseSafetyToolServiceImpl implements IBaseSafetyToolService {
       return AjaxResult.error("文件压缩失败");
       return AjaxResult.error("文件压缩失败");
     }
     }
     String zipFilePath = localFilePath + "/" + zipFile;
     String zipFilePath = localFilePath + "/" + zipFile;
+    log.info("压缩文件: {} - {}", zipFile, zipFilePath);
     return sysFileService.uploadFile(zipFilePath);
     return sysFileService.uploadFile(zipFilePath);
   }
   }