REQ-3540: 隐藏oss file key
This commit is contained in:
parent
7461549ff5
commit
e1003b1842
@ -119,6 +119,14 @@ public class IndexNodeInfo implements NodeValue, ValueContainer<IndexNodeInfo> {
|
||||
|
||||
private IndexNodeAttributes attributes;
|
||||
|
||||
@JsonIgnore
|
||||
@JSONField(serialize = false)
|
||||
public IndexNodeAttributes getOrCreateAttributes() {
|
||||
if (attributes == null)
|
||||
attributes = new IndexNodeAttributes();
|
||||
return attributes;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
@JSONField(serialize = false)
|
||||
public FileTemplateNodeInfo getOrCreateFileTemplateNodeInfo() {
|
||||
|
||||
@ -15,6 +15,7 @@ import cn.axzo.maokai.api.vo.response.tree.ValueNode;
|
||||
import cn.axzo.maokai.api.vo.response.tree.ValueNodeRecursiveVisitor;
|
||||
import cn.axzo.maokai.api.vo.response.tree.WalkingDecision;
|
||||
import cn.axzo.nanopart.doc.api.domain.IndexNodeInfo;
|
||||
import cn.axzo.nanopart.doc.api.enums.IndexNodeType;
|
||||
import cn.axzo.nanopart.doc.config.DocProps;
|
||||
import cn.axzo.nanopart.doc.entity.IndexNode;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -31,6 +32,11 @@ public class IndexNodeTreeUtils {
|
||||
public RootNode<IndexNodeInfo> transform(List<IndexNode> subtreeNodes) {
|
||||
RootNode<IndexNodeInfo> root = TreeUtils.transform(subtreeNodes, IndexNodeInfo.class);
|
||||
TreeUtils.connectValueChildren(root);
|
||||
for (ValueNode<IndexNodeInfo> valueNode : root.getValueNodes()) {
|
||||
IndexNodeInfo indexNode = valueNode.getValue();
|
||||
if (indexNode.getNodeType() == IndexNodeType.FILE)
|
||||
indexNode.getOrCreateAttributes().getOrCreateFileAttributes().setOssFileKey("hidden");
|
||||
}
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user