feat: (REQ-3540) 文件信息version优化

This commit is contained in:
xudawei 2025-03-20 17:27:00 +08:00
parent d8321bf661
commit c491cbb956
2 changed files with 13 additions and 1 deletions

View File

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

View File

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