package com.hnshituo.core.auth.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.hnshituo.core.auth.vo.User;
import com.hnshituo.orm.GenericMapper;

public interface UserMapper extends GenericMapper<User, String> {
	public User login(User inUser, String password);
	
	public boolean isIdExist(@Param("id")String id);
	
	public boolean isLoginNameExist(@Param("loginName")String loginName);
	
	public void resetPassword(@Param("id")String id, @Param("password")String password);
	
	public void resetDevice(@Param("id")String id, @Param("device")String device);
	
	public List<User> findByDeptId(@Param("deptId")String deptId);
	
	public List<User> doUserInfo(String dptNo);
	
	public List<User> findByUserIdApp(@Param("id")String id);
	
	public List<User> findUserInfoApp();

	public List<User> findAllUser();
	
	public List<User> findUserByDepartmentNo(String departmentNo,String userName,int pageIndex,int pageSize);
	
	public List<User> findUser(String deptNo,String personNo,int pageIndex,int pageSize);
	
	public User doQueryByUUID(String UUID);
	
	public int countUser(String departmentNo, String userName);
	
	public List<User> doQueryByNameBlur(String username,String deptNo,int pageIndex,int pageSize);
	
	public int countByNameBlur(String username,String deptNo);

	public List<User> doQueryByDeptNos(String depts);

	public List<User> doQueryByRoleNos(String roles);

	public List<User> doQueryByRoleNo(Integer roleId, String userName, String dptId);

	public int doQueryByRoleNoCount(Integer roleId, String userName, String dptId);

	public void doUpdateUserDpt(String mainDpt,String mainDptName,String childDpt);

}
