xyz.erupt.core.service.PreEruptDataService Maven / Gradle / Ivy
package xyz.erupt.core.service;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import xyz.erupt.annotation.constant.AnnotationConst;
import xyz.erupt.annotation.expr.Expr;
import xyz.erupt.annotation.sub_erupt.Filter;
import xyz.erupt.core.invoke.DataProcessorManager;
import xyz.erupt.core.invoke.DataProxyInvoke;
import xyz.erupt.core.invoke.ExprInvoke;
import xyz.erupt.core.query.Column;
import xyz.erupt.core.query.EruptQuery;
import xyz.erupt.core.util.DataHandlerUtil;
import xyz.erupt.core.view.EruptModel;
import xyz.erupt.core.view.TreeModel;
import java.util.*;
@Service
public class PreEruptDataService {
/**
* 根据要素生成树结构
*
* @param eruptModel eruptModel
* @param id id
* @param label label
* @param pid parent id
* @param query 查询对象
* @return 树对象
*/
public Collection geneTree(EruptModel eruptModel, String id, String label, String pid, Expr rootId, EruptQuery query) {
List columns = new ArrayList<>();
columns.add(new Column(id, AnnotationConst.ID));
columns.add(new Column(label, AnnotationConst.LABEL));
if (!AnnotationConst.EMPTY_STR.equals(pid)) {
columns.add(new Column(pid, AnnotationConst.PID));
}
Collection
© 2015 - 2024 Weber Informatics LLC | Privacy Policy