diff --git a/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/entity/IndexNode.java b/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/entity/IndexNode.java index 7ddca53e..bfb388ee 100644 --- a/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/entity/IndexNode.java +++ b/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/entity/IndexNode.java @@ -138,19 +138,6 @@ public class IndexNode extends BaseEntity implements NodeValue, Index return getOrCreateAttributes().getOrCreateFileAttributes(); } - /** - * 获取Attributes中fileAttribute - */ - public FileAttributes getFileAttributes() { - if (Objects.isNull(this.getAttributes())) { - return new FileAttributes(); - } - if (Objects.isNull(this.getAttributes().getFileAttributes())) { - return new FileAttributes(); - } - return this.getAttributes().getFileAttributes(); - } - public Path path() { return Path.wrap(path); } diff --git a/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/wps/wpsedit/WpsEditManager.java b/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/wps/wpsedit/WpsEditManager.java index 024217b2..121a988c 100644 --- a/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/wps/wpsedit/WpsEditManager.java +++ b/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/wps/wpsedit/WpsEditManager.java @@ -115,12 +115,12 @@ public class WpsEditManager { return WpsEditUploadCompleteResponse.builder() .docCode(request.getDocCode()) .name(node.getFullFileName()) - .version(node.getFileAttributes().getVersion()) + .version(node.getOrCreateFileAttributes().getVersion()) .size(request.getSize()) .createTime(node.getCreateAt().getTime()) .modifyTime(node.getUpdateAt().getTime()) - .modifierId(node.getFileAttributes().getModifierId()) - .creatorId(node.getFileAttributes().getCreatorId()) + .modifierId(node.getOrCreateFileAttributes().getModifierId()) + .creatorId(node.getOrCreateFileAttributes().getCreatorId()) .build(); }