package com.mortals.xhx.module.demotree.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.demotree.model.DemotreeEntity;
import com.mortals.xhx.module.demotree.model.DemotreeTreeSelect;
import java.util.List;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;

/**
* DemotreeService
*
* 树信息 service接口
*
* @author zxfei
* @date 2021-11-26
*/
public interface DemotreeService extends ICRUDService<DemotreeEntity,Long>{

    /**
    * 是否存在树信息节点
    *
    * @param demotreeId 树信息ID
    * @return 结果
    */
    boolean hasChildByDemotreeId(Long demotreeId);


    /**
    * 查询树信息数据
    *
    * @param demotree 树信息
    * @return 树信息集合
    */
    List<DemotreeEntity> selectDemotreeList(DemotreeEntity demotree);


    /**
    * 构建前端所需要下拉树结构
    *
    * @param demotreeList 树信息列表
    * @return 下拉树结构列表
    */
    List<DemotreeTreeSelect> buildDemotreeTreeSelect(List<DemotreeEntity> demotreeList);

}