فهرست منبع

上传文件接口增加耗时打印

dengsixing 2 سال پیش
والد
کامیت
3b109fe024
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      src/main/java/com/fdkankan/scene/service/impl/SceneUploadServiceImpl.java

+ 3 - 0
src/main/java/com/fdkankan/scene/service/impl/SceneUploadServiceImpl.java

@@ -151,17 +151,20 @@ public class SceneUploadServiceImpl extends ServiceImpl<ISceneUploadMapper, Scen
             realFileName = realFileName.substring(0, realFileName.lastIndexOf(oldExtName)) + newExtName;
 
             String ossPath = StrUtil.isNotBlank(uploadPath) ? uploadPath : (String.format(UploadFilePath.USER_EDIT_PATH ,num) + realFileName);
+            System.out.println(timer.intervalRestart());
             try {
                 fYunFileService.uploadFile(bucket, newFile.getPath(), ossPath);
             }catch (Exception e){
                 log.error(ossPath+"上传文件失败"+e);
                 throw new BusinessException(ErrorCode.FAILURE_CODE_7013);
             }
+            System.out.println(timer.intervalRestart());
             urlList.add(realFileName);
 
             FileUtils.delFile(newFile.getPath());
             //添加记录
             this.saveData(num,ossPath,bizType,userId);
+            System.out.println(timer.intervalRestart());
         }
         System.out.println(timer.intervalRestart());
         StringBuilder returnString = new StringBuilder();