|
@@ -356,8 +356,9 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
|
String resultPath = resourcePath.substring(0, resourcePath.lastIndexOf(".")) + BizConstant.STABLE_SUFFIX;
|
|
|
|
|
|
try {
|
|
|
- List<String> inputImageList = getImageUrls(ossEntity, unzipPath, BizConstant.UNZIP_SUFFIX);
|
|
|
- List<String> outputImageList = getImageUrls(ossEntity, resultPath, BizConstant.STABLE_SUFFIX);
|
|
|
+ String frontBasePath = filePath.substring(0, filePath.lastIndexOf("."));
|
|
|
+ List<String> inputImageList = getImageUrls(frontBasePath, unzipPath, BizConstant.UNZIP_SUFFIX);
|
|
|
+ List<String> outputImageList = getImageUrls(frontBasePath, resultPath, BizConstant.STABLE_SUFFIX);
|
|
|
|
|
|
HashMap<String, String> nameToUrl1 = new HashMap<>();
|
|
|
for (String imageUrl : inputImageList) {
|
|
@@ -405,8 +406,8 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
|
return CommonResult.success(readLogContent(logPath), "success");
|
|
|
}
|
|
|
|
|
|
- public List<String> getImageUrls(SysOssVo ossEntity, String path, String suffix) {
|
|
|
- String urlPrefix = ossEntity.getUrl().substring(0, ossEntity.getUrl().lastIndexOf(".")) + suffix;
|
|
|
+ public List<String> getImageUrls(String frontBasePath, String path, String suffix) {
|
|
|
+ String urlPrefix = frontBasePath + suffix;
|
|
|
// 列出unzipPath下所有图片文件
|
|
|
File directory = new File(path);
|
|
|
File[] files = directory.listFiles();
|