Commit 706eae0e authored by 赵啸非's avatar 赵啸非

产品版本更新分站点

parent 22d96533
......@@ -174,10 +174,11 @@ public class ProductVersionServiceImpl extends AbstractCRUDServiceImpl<ProductVe
productVersion.setSiteId(sitePdu.getId());
productVersion.setSiteName(sitePdu.getSiteName());
productVersion.setSiteCode(sitePdu.getSiteCode());
String sourceFilePath = uploadService.getFilePath(productVersionEntity.getFilePath());
String mainName = FileUtil.mainName(productVersion.getFilePath());
//todo 复制附件 和地址
String targetFilePath = uploadService.getFilePath(sitePdu.getSiteCode() + "/" + mainName);
FileUtil.copyFile(productVersion.getFilePath(), targetFilePath, StandardCopyOption.REPLACE_EXISTING);
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