|
|
@ -490,8 +490,7 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
|
|
|
|
sourceImgUrlToOssImgUrlMap.put(imgUrl, filter.put("url", currOssImgUrl));
|
|
|
|
sourceImgUrlToOssImgUrlMap.put(imgUrl, filter.put("url", currOssImgUrl));
|
|
|
|
ret = uploadMaterialImageSyncToDd(shopId, filter, accessToken);
|
|
|
|
ret = uploadMaterialImageSyncToDd(shopId, filter, accessToken);
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: 2023/9/13 涉及到oss
|
|
|
|
moveService.delOssMainImgUrls(new String[]{currOssImgUrl});
|
|
|
|
// delOssMainImgUrls(Collections.singletonList(currOssImgUrl));
|
|
|
|
|
|
|
|
if (CommonTool.isSuccessRet(ret)) {
|
|
|
|
if (CommonTool.isSuccessRet(ret)) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -513,18 +512,14 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
|
|
|
|
return CommonTool.failResult("gif动图,不处理");
|
|
|
|
return CommonTool.failResult("gif动图,不处理");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: 2023/9/13 涉及到oss 暂时不处理
|
|
|
|
String moveDir = "temp/ddTransfer";
|
|
|
|
// imageData = CommonTool.convertImageToJpg(imageData);
|
|
|
|
String ossPath = String.format("%s/%s/%s.%s", moveDir, new SimpleDateFormat("yyyy-MM-dd").format(new Date()), UUID.randomUUID(), "jpg");
|
|
|
|
// String moveDir = "temp/ddTransfer";
|
|
|
|
Ret ret = storageService.uploadContent(ossPath, imageData);
|
|
|
|
// String ossPath = String.format("%s/%s/%s.%s", moveDir, LocalDate.now().toString(), UUID.randomUUID().toString(), "jpg");
|
|
|
|
if (CommonTool.isFailRet(ret)) {
|
|
|
|
// Ret ret = OssTool.uploadImmutableObjectByContent(ossPath, imageData);
|
|
|
|
return ret;
|
|
|
|
// if (CommonTool.isFailRet(ret)) {
|
|
|
|
}
|
|
|
|
// return ret;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// return CommonTool.successResult("ossUrl", OssTool.getPubOssUrlByOssPath(ossPath));
|
|
|
|
|
|
|
|
StrStrMap strMap = new StrStrMap();
|
|
|
|
StrStrMap strMap = new StrStrMap();
|
|
|
|
strMap.put("ossUrl", "");
|
|
|
|
strMap.put("ossUrl", storageService.getPubOssUrlByOssPath(ossPath));
|
|
|
|
return Ret.success(strMap);
|
|
|
|
return Ret.success(strMap);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|