|
@@ -34,6 +34,7 @@ import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -107,6 +108,15 @@ public class ChangeOrderLogic {
|
|
|
@Resource
|
|
|
GoodsCategoryItemService goodsCategoryItemService;
|
|
|
|
|
|
+ @Value("${ali.oss.endpoint.ww}")
|
|
|
+ private String OSS_WW;
|
|
|
+
|
|
|
+ @Value("${sys.url}")
|
|
|
+ private String sysUrl;
|
|
|
+
|
|
|
+ @Value("${server.servlet.context-path}")
|
|
|
+ private String contextPath;
|
|
|
+
|
|
|
|
|
|
private final OldProductManagerService oldProductManagerService;
|
|
|
private final OldProductManagerItemService oldProductManagerItemService;
|
|
@@ -231,7 +241,7 @@ public class ChangeOrderLogic {
|
|
|
// 生成的文件的存放路径
|
|
|
File mkdir = FileUtil.mkdir(path + "/tmp/report" );
|
|
|
|
|
|
- File file= CommonUtils.getFileByHttpURL(patch, mkdir.getPath());
|
|
|
+ File file= CommonUtils.getFileByHttpURL(patch, mkdir.getPath(), OSS_WW, sysUrl + contextPath);
|
|
|
|
|
|
|
|
|
String contentType = FileNameUtil.getSuffix(patch);
|
|
@@ -324,7 +334,7 @@ public class ChangeOrderLogic {
|
|
|
// 生成的文件的存放路径
|
|
|
File mkdir = FileUtil.mkdir(path + "/tmp/report" );
|
|
|
|
|
|
- File fileByHttpURL = CommonUtils.getFileByHttpURL(patch, mkdir.getPath());
|
|
|
+ File fileByHttpURL = CommonUtils.getFileByHttpURL(patch, mkdir.getPath(), OSS_WW, sysUrl + contextPath);
|
|
|
File file = FileUtil.file(fileName+"/test2_result.png");
|
|
|
|
|
|
URL url = new URL(patch);
|