|
@@ -117,7 +117,6 @@ public class SceneUploadServiceImpl extends ServiceImpl<ISceneUploadMapper, Scen
|
|
|
|
|
|
public String uploadFiles(String sendFileName,String bizType,List<MultipartFile> files,
|
|
public String uploadFiles(String sendFileName,String bizType,List<MultipartFile> files,
|
|
String num, Integer type,Long userId, String uploadPath) throws Exception{
|
|
String num, Integer type,Long userId, String uploadPath) throws Exception{
|
|
- TimeInterval timer = DateUtil.timer();
|
|
|
|
if (StrUtil.isEmpty(num))
|
|
if (StrUtil.isEmpty(num))
|
|
throw new BusinessException(ServerCode.PARAM_REQUIRED, "num");
|
|
throw new BusinessException(ServerCode.PARAM_REQUIRED, "num");
|
|
if(CollUtil.isEmpty(files))
|
|
if(CollUtil.isEmpty(files))
|
|
@@ -151,22 +150,21 @@ public class SceneUploadServiceImpl extends ServiceImpl<ISceneUploadMapper, Scen
|
|
realFileName = realFileName.substring(0, realFileName.lastIndexOf(oldExtName)) + newExtName;
|
|
realFileName = realFileName.substring(0, realFileName.lastIndexOf(oldExtName)) + newExtName;
|
|
|
|
|
|
String ossPath = StrUtil.isNotBlank(uploadPath) ? uploadPath : (String.format(UploadFilePath.USER_EDIT_PATH ,num) + realFileName);
|
|
String ossPath = StrUtil.isNotBlank(uploadPath) ? uploadPath : (String.format(UploadFilePath.USER_EDIT_PATH ,num) + realFileName);
|
|
- System.out.println(timer.intervalRestart());
|
|
|
|
try {
|
|
try {
|
|
|
|
+ TimeInterval timer = DateUtil.timer();
|
|
fYunFileService.uploadFile(bucket, newFile.getPath(), ossPath);
|
|
fYunFileService.uploadFile(bucket, newFile.getPath(), ossPath);
|
|
|
|
+ System.out.println(timer.intervalRestart());
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
log.error(ossPath+"上传文件失败"+e);
|
|
log.error(ossPath+"上传文件失败"+e);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_7013);
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_7013);
|
|
}
|
|
}
|
|
- System.out.println(timer.intervalRestart());
|
|
|
|
|
|
+
|
|
urlList.add(realFileName);
|
|
urlList.add(realFileName);
|
|
|
|
|
|
FileUtils.delFile(newFile.getPath());
|
|
FileUtils.delFile(newFile.getPath());
|
|
//添加记录
|
|
//添加记录
|
|
this.saveData(num,ossPath,bizType,userId);
|
|
this.saveData(num,ossPath,bizType,userId);
|
|
- System.out.println(timer.intervalRestart());
|
|
|
|
}
|
|
}
|
|
- System.out.println(timer.intervalRestart());
|
|
|
|
StringBuilder returnString = new StringBuilder();
|
|
StringBuilder returnString = new StringBuilder();
|
|
for (String res : urlList) {
|
|
for (String res : urlList) {
|
|
if(StringUtils.isNotBlank(returnString)){
|
|
if(StringUtils.isNotBlank(returnString)){
|