Procházet zdrojové kódy

【CHG】导出二维码增加计时日志

ZhaoMn před 3 roky
rodič
revize
7aa8e1dcca

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

@@ -224,6 +224,7 @@ public class BaseSafetyToolServiceImpl implements IBaseSafetyToolService {
     if(!tmpFile.exists() && !tmpFile.mkdirs()){
       return AjaxResult.error("临时目录创建失败");
     }
+    log.info(" * 开始整理二维码图片文件 * ");
     for (BaseSafetyTool tool : tools){
       String jpgPath = tmpPath + tool.getToolCode() + ".jpg";
       HttpUtils.download(tool.getQcodeUrl(), jpgPath);

+ 1 - 1
railway-common/src/main/java/com/railway/common/utils/http/HttpUtils.java

@@ -140,7 +140,7 @@ public class HttpUtils {
     }
     log.debug(" -- {}", url);
     File file = new File(filePath);
-    byte[] bytes = new byte[40960];
+    byte[] bytes = new byte[4096];
     int len;
     try (FileOutputStream os = new FileOutputStream(file, true)){
       while ((len = in.read(bytes)) != -1) {