Merge remote-tracking branch 'origin/feature/REQ-3540' into feature/REQ-3540

This commit is contained in:
yanglin 2025-03-20 18:02:15 +08:00
commit af021df447
2 changed files with 14 additions and 1 deletions

View File

@ -2,6 +2,7 @@
package cn.axzo.nanopart.doc.api.domain;
import cn.axzo.nanopart.doc.api.enums.FileFormat;
import com.aliyuncs.utils.StringUtils;
import lombok.Getter;
import lombok.Setter;
@ -46,6 +47,7 @@ public class FileAttributes {
/**
* 返回version
* version最小为1
*/
public Integer fetchVersion(){
if (Objects.isNull(version) || version <= 0) {
@ -54,4 +56,15 @@ public class FileAttributes {
return version;
}
/**
* 返回modifierId
* 修改人为空则返回创建人
*/
public String fetchModifierId(){
if (StringUtils.isEmpty(modifierId)) {
return creatorId;
}
return modifierId;
}
}

View File

@ -58,7 +58,7 @@ public class WpsBaseManager {
.createAt(node.getCreateAt())
.updateAt(node.getUpdateAt())
.creatorId(node.getAttributes().getFileAttributes().getCreatorId())
.modifierId(node.getAttributes().getFileAttributes().getModifierId())
.modifierId(node.getOrCreateFileAttributes().fetchModifierId())
.build();
}