package cn.wisenergy.mapper;

import cn.wisenergy.model.app.WorkRole;
import cn.wisenergy.model.app.WorkUser;
import cn.wisenergy.model.dto.StatisticsTableDto;
import cn.wisenergy.model.dto.UserRoleDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

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

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author chenqi
 * @since 2021-01-19
 */
public interface WorkUserMapper extends BaseMapper<WorkUser> {

    WorkUser getUserInfo(Map<String, Object> map);

    /**
     * 根据id获取用户一些基本信息
     * @param userId
     * @return
     */
    WorkUser getUserById(Integer userId);

    Integer updateUserInfo(WorkUser user);

    /**
     * 获取用户主键、姓名、部门名称
     * @param userIds
     * @return
     */
    List<StatisticsTableDto> getStatisticsTableDtos(List<Integer> userIds);

    List<UserRoleDto> getUserRoleDto();


    List<WorkRole> getUserRole(Integer id);


}
