Browse Source

REPORT-92893 锁定的模板,重复另存副本,设计器页面模板内容不更新--方法拆两半

release/11.0
John.Ying-应志浩 2 years ago
parent
commit
b7f7876932
  1. 6
      designer-base/src/main/java/com/fr/design/utils/TemplateUtils.java

6
designer-base/src/main/java/com/fr/design/utils/TemplateUtils.java

@ -132,7 +132,7 @@ public class TemplateUtils {
private static void createAndOpenTemplate0(FILE file, String oldPath, boolean createByEditingTemplate, boolean openNewTemplate, @Nullable JTemplate<?, ?> template) {
CompletableFuture.supplyAsync(() -> {
CompletableFuture<Boolean> createTemplate = CompletableFuture.supplyAsync(() -> {
try {
// 读取模板数据
byte[] content = getTemplateData(createByEditingTemplate, oldPath);
@ -162,7 +162,9 @@ public class TemplateUtils {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return false;
}
}).thenApply((Function<Boolean, Void>) aBoolean -> {
});
createTemplate.thenApply((Function<Boolean, Void>) aBoolean -> {
if (!aBoolean) {
//备份失败直接返回
return null;

Loading…
Cancel
Save