package cn.com.qmth.stmms.biz.user.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import cn.com.qmth.stmms.biz.user.model.User;

public interface UserDao extends PagingAndSortingRepository<User, Integer>, JpaSpecificationExecutor<User> {

    public List<User> findByLoginName(String LoginName);

    public List<User> findByLoginNameAndPassword(String LoginName, String password);

    public List<User> findBySchoolId(int schoolId);

    public List<User> findBySchoolIdAndRoleNamesContaining(int schoolId, String roleName);

    public List<User> findByLoginNameAndStatus(String LoginName,Integer status);
}
