package com.zcxk.rmcp.web.service;

import com.zcxk.rmcp.api.vo.OrgTreeVo;
import com.zcxk.rmcp.core.entity.Org;

import java.util.List;

/**
 * 
 * @author linqingwei
 * @date 2021-07-22 10:26
 */
public interface OrgService{


    /**
    * 添加数据
    * @author Andy
    * @date 14:57 2021/8/3
    * @param record:
    * @return int
    **/
    int insertSelective(Org record);

    /**
    * 更新数据
    * @author Andy
    * @date 14:58 2021/8/3
    * @param record:
    * @return int
    **/
    int updateByPrimaryKeySelective(Org record);

    /**
    * 查询集合
    * @author Andy
    * @date 14:58 2021/8/3
    * @param org:
    * @return java.util.List<com.zcxk.rmcp.api.vo.OrgTreeVo>
    **/
    List<OrgTreeVo> getUserTrees(Org org);

    /**
    * 根据名字查找
    * @author Andy
    * @date 14:58 2021/8/3
    * @param tenantId:
    * @param name:
    * @return com.zcxk.rmcp.core.entity.Org
    **/
    Org findByName(String tenantId, String name);

    /**
    * 查询父节点
    * @author Andy
    * @date 14:58 2021/8/3
    * @param parentId:
    * @param name:
    * @return com.zcxk.rmcp.core.entity.Org
    **/
    Org findByParentIdAndName(Integer parentId, String name);
}
