package com.saye.hrs.mapper.system;

import com.saye.hrs.model.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
public interface UsersMapper {

	/**
	 * 分页查询用户列表
	 * */
	public List<Users> searchUsers(HashMap<Object, Object> map);
	
	/**新增用户
	 * */
	public int insertUser(HashMap<Object, Object> map);
	
	/**修改用户信息
	 * */
	public int modifyUsers(HashMap<Object, Object> map);
	/**user用户密码重置
	 * */
	public int modifyPassword(HashMap<Object, Object> map);
	
	/**
	 * 修改状态 启用禁用
	 * */
	public int unableUser(HashMap<Object, Object> map);
	
	/**新增用户名验证
	 * */
	public List<Users> searchByName(String userName);

	/**
	 * @description 修改用户密码
	 * @author thuang       
	 * @created 2019年11月28日 上午8:41:34 
	 * @param password
	 * @throws Exception
	 */
	public void modifyPassword(String username, String password, String modifyTime) throws Exception;

	public void modifyLockTime(String username, String lockTime);

    void insertExcelUsers(List<HashMap<Object, Object>> list);

    List<HashMap<Object, Object>> findUserByDepartIds(@Param("idList") List<String> idList)throws Exception;

	/**
	 * @description: 根据部门id查询人员信息
	 * @author thuang
	 * @date 2021/8/24 10:33
	 * @version 1.0
	 */
	List<HashMap<Object, Object>> findUserByDepartIdsAndIsactive(@Param("idList") List<String> idList) throws Exception;
    /**
     * @description: 查询用户及部门的详细信息
     * @author thuang
     * @date 2021/8/24 10:21
     * @version 1.0
     */
	List<HashMap<Object, Object>> findUserAndIsactive() throws Exception;
}
