package com.njcn.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.system.pojo.param.DictTreeParam;
import com.njcn.system.pojo.po.SysDicTreePO;
import com.njcn.system.pojo.vo.DictTreeVO;
import io.swagger.models.auth.In;

import java.util.List;

/**
 * Description:
 * Date: 2023/6/9  14:00【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
public interface SysDicTreePOService extends IService<SysDicTreePO> {

    /**
     * 初始化缓存设备树
     */
    void refreshDictTreeCache();

    boolean addDictTree(DictTreeParam dictTreeParam);

    boolean updateDictTree(DictTreeParam dictTreeParam);

    boolean deleteDictTree(String id);

    List<DictTreeVO> queryByPid(String pid);

    DictTreeVO queryByCode(String code);

    List<DictTreeVO> queryLastLevelById(String id);

    /**
     * 根据id查询字典数据
     *
     * @param id id
     */
    SysDicTreePO queryById(String id);

    /**
     * 查询所有树形字典
     *
     * @author cdf
     * @date 2023/12/18
     */
    List<SysDicTreePO> queryAll();

    /**
     * 分类查询所有树形字典
     *
     * @author cdf
     * @date 2023/12/18
     */
    List<SysDicTreePO> queryAllByType(Integer type);

    List<SysDicTreePO> queryTree();

    /**
     * 查询所有大类节点
     * @date 2023/12/18
     */
    List<SysDicTreePO> queryFirstNodeList(Integer type);

    /**
     * 根据code查询自动树
     * @param code code
     */
    List<SysDicTreePO> queryByCodeList(String code);

    List<SysDicTreePO> queryDictType(Integer lineType, Integer conType);
}
