package com.aiotagro.cattletrade.business.mapper;

import com.aiotagro.cattletrade.business.dto.SysUserDto;
import com.aiotagro.cattletrade.business.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 员工管理表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2024-12-26
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 查询用户
     *
     * @param dto
     * @return
     */
    List<SysUser> queryList(@Param("item") SysUserDto dto);

    /**
     * 获取用户信息
     *
     * @param currentUserId
     * @return
     */
    SysUser getUserInfoById(@Param("id") Integer currentUserId);

    /**
     * 查询所有用户列表（用于权限分配）
     * 
     * @return 用户列表
     */
    List<SysUser> selectUserListForPermission();
}
