package org.jeecg.modules.system.service;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.modules.system.entity.SysCategory;
import org.jeecg.modules.system.model.TreeSelectModel;

import java.util.List;

/**
 * @Description: 分类字典
 * @Author: jeecg-boot
 * @Date:   2019-05-29
 * @Version: V1.0
 */
public interface ISysCategoryService extends IService<SysCategory> {

	/**根节点父ID的值*/
	public static final String ROOT_PID_VALUE = "0";

	void addSysCategory(SysCategory sysCategory);

	void updateSysCategory(SysCategory sysCategory);

    List<SysCategory> getListByPid(String pid);

    JSONArray getByteDanceIndustryList();

    /**
	  * 根据父级编码加载分类字典的数据
	 * @param pcode
	 * @return
	 */
    List<TreeSelectModel> queryListByCode(String pcode) throws JeecgBootException;

    /**
	  * 根据pid查询子节点集合
	 * @param pid
	 * @return
	 */
    List<TreeSelectModel> queryListByPid(String pid);

    SysCategory getByCode(String getCode);
}
