package com.ssj.dao.sys.usercenter.dao;

import com.ssj.bean.sys.usercenter.domain.TeacherCenter;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Mount Liu
 * @date 2018/9/20
 */
@Repository
public interface TeacherCenterDao extends JpaRepository<TeacherCenter, String> {

    /**
     * 分页查询列表
     * @param specification
     * @param page
     * @return
     */
    Page<TeacherCenter> findAll(Specification<TeacherCenter> specification, Pageable page);

    /**
     * 查询校长名下的老师
     * @param schoolmasterUserId 校长的userId
     * @return
     */
    List<TeacherCenter> findByMasterId(String schoolmasterUserId);

}
