package com.hdkj.lt.core.sys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hdkj.lt.core.sys.model.dto.UserQueryDTO;
import com.hdkj.lt.core.sys.model.po.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @Description:
 * @Author: wenhao
 * @Create: 2024/02/20 10:09
 * @Version: 1.0
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 根据单位和角色别名获取用户
     */
    List<SysUser> listByCondition(@Param("params") UserQueryDTO queryDTO);


    /**
     * 取下级数据管理员
     */
    Set<Long> queryChildDateManager(@Param("parentId") Long parentId, @Param("roleCode") String roleCode);

    Integer getUserNodeByOrgType(@Param("unitId") String unitId, @Param("userNode") Integer userNode);

    /**
     * 获取用户树
     *
     * @param parentId
     * @return
     */
//    List<JSTreeModel> getLoadingUserTree(@Param("parentId") String parentId);

}
