REQ-3540: remove duplication
This commit is contained in:
parent
22b0e54074
commit
3d96f2c04c
@ -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);
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user