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