feat: (REQ-3540) 文件信息version优化
This commit is contained in:
parent
d8321bf661
commit
c491cbb956
@ -5,6 +5,8 @@ import cn.axzo.nanopart.doc.api.enums.FileFormat;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@ -42,4 +44,14 @@ public class FileAttributes {
|
||||
*/
|
||||
private String modifierId;
|
||||
|
||||
/**
|
||||
* 返回version
|
||||
*/
|
||||
public Integer fetchVersion(){
|
||||
if (Objects.isNull(version) || version <= 0) {
|
||||
return 1;
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public class WpsBaseManager {
|
||||
return WpsFetchFileResponse.builder()
|
||||
.docCode(docCode)
|
||||
.name(node.getFullFileName())
|
||||
.version(node.getAttributes().getFileAttributes().getVersion())
|
||||
.version(node.getOrCreateFileAttributes().getVersion())
|
||||
.size(node.getSize())
|
||||
.createAt(node.getCreateAt())
|
||||
.updateAt(node.getUpdateAt())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user