package com.unis.crk.basic.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.unis.crk.basic.entity.OrgInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

/**
 * <p>
 * 组织机构信息表 Mapper 接口
 * </p>
 *
 * @author ghh
 * @since 2021-09-29
 */
@Repository
public interface OrgInfoMapper extends BaseMapper<OrgInfo> {

    int updateOrgLevel(Map<String,Object> map);

    @SqlParser(filter=true)
    List<OrgInfo> getTree(HashMap orgInfoQueryWrapper);
    @SqlParser(filter=true)
    List<OrgInfo> getAllChildren(HashMap orgInfoQueryWrapper);

    OrgInfo selectOrgInfoVo(HashMap orgInfoQueryWrapper);

    List<OrgInfo> getallOrgInfo();

    int getCountChildren(@Param("orgId")String orgId);
}
