/*
 * Author: wangjian
 * 生成mapper
 */
package com.tofly.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.base.entity.User;
import org.apache.ibatis.annotations.Param;

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

/**
 * 用户表
 *
 * @author admin
 * @date Thu Oct 10 00:00:00 CST 2019
 */
public interface UserMapper extends BaseMapper<User> {

    public String getDName(String departmentId);

    public User getUserById(Long id);

    public List<User> getExistUserListByRole(Long roleId);

    public List<User> getNoExistUserListByRole(Long roleId);

    public List<Map> getSources(Long departmentId);

    //public List<Map> getUserPage(Page page);

    public Page<Map> getUserPage(Page page, @Param("user") User user);

    void updateUserInfo(User user);

    public List<Map> getUserByMenu(@Param("menuName") String menuName);

    List<Map>  getListHistory(Page page, @Param("map")Map map);

    boolean updateByIdList(List<Long> list);

    boolean updateByIdListToUnlock(List<Long> list);

    boolean updateByIdStatusFlag(List<Long> list);

    boolean updateUnStatusFlag(List<Long> list);

    List<Map<String, String>> sysUserReport();

    List<Long> getDeptUserIdList(@Param("deptIdList") List<Long> deptIdList);
}
