package com.bocloud.ims.interfaces.config;


import com.bocloud.cmp.model.DictionaryBean;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.ims.entity.common.Dictionary;

import java.util.List;
import java.util.Map;

/**
 * 环境信息服务接口
 *
 * @author dmw
 */
public interface DictService {

    /**
     * 保存
     *
     * @param dictionary
     * @return
     */
    BocloudResult<Dictionary> create(Dictionary dictionary);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    BocloudResult remove(Long id);

    /**
     * 修改
     *
     * @param bean
     * @return
     */
    BocloudResult<Dictionary> modify(DictionaryBean bean);

    /**
     * 字典树
     *
     * @param value
     * @return
     */
    BocloudResult<List<Map<String, Object>>> list(String value);

    /**
     * 根据值获取子节点数据
     *
     * @param pid
     * @return
     */
    BocloudResult<List<Dictionary>> listChild(String pid);

    /**
     * 查询字典树
     *
     * @param pid
     * @return
     */
    BocloudResult<List<Dictionary>> childTree(String pid);

}
