REQ-3540: remove duplication

This commit is contained in:
yanglin 2025-03-19 17:58:38 +08:00
parent 22b0e54074
commit 3d96f2c04c
2 changed files with 3 additions and 16 deletions

View File

@ -138,19 +138,6 @@ public class IndexNode extends BaseEntity<IndexNode> 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);
}

View File

@ -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();
}