Commit 75b5bb66 authored by 赵啸非's avatar 赵啸非

产品版本更新分站点

parent 244bed20
......@@ -175,11 +175,14 @@ public class ProductVersionServiceImpl extends AbstractCRUDServiceImpl<ProductVe
productVersion.setSiteName(sitePdu.getSiteName());
productVersion.setSiteCode(sitePdu.getSiteCode());
String sourceFilePath = uploadService.getFilePath(productVersion.getFilePath());
String mainName = FileUtil.mainName(productVersion.getFilePath());
//todo 复制附件 和地址
String targetFilePath = uploadService.getFilePath(sitePdu.getSiteCode() + "/" + mainName);
FileUtil.copyFile(sourceFilePath, targetFilePath, StandardCopyOption.REPLACE_EXISTING);
productVersion.setFilePath(targetFilePath);
boolean exist = FileUtil.exist(sourceFilePath);
if (exist) {
String mainName = FileUtil.mainName(productVersion.getFilePath());
//todo 复制附件 和地址
String targetFilePath = uploadService.getFilePath(sitePdu.getSiteCode() + "/" + mainName);
FileUtil.copyFile(sourceFilePath, targetFilePath, StandardCopyOption.REPLACE_EXISTING);
productVersion.setFilePath(targetFilePath);
}
this.save(productVersion, context);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment