| 12345678910111213141516171819202122232425262728293031323334353637 |
- package com.nju.edu.eval.data.dao;
- import com.nju.edu.eval.data.entity.Exam;
- import org.springframework.data.jpa.repository.JpaRepository;
- import org.springframework.stereotype.Repository;
- import javax.xml.crypto.Data;
- import java.util.Date;
- import java.util.List;
- /**
- * @author mars
- */
- @Repository
- public interface ExamDao extends JpaRepository<Exam, Integer> {
- /**
- * 根据创建者Id查询所有的考试
- * @param creatorId
- * @return 考试列表
- */
- List<Exam> findAllByCreator_Id(Integer creatorId);
- /**
- * 获得开始时间在参数范围内的考试
- * @param startTime 开始时间范围
- * @param endTime 结束时间范围
- * @return 考试列表
- */
- List<Exam> findAllByStartTimeBetweenOrderByStartTime(Date startTime, Date endTime);
- /**
- * 获得所有非隐藏的考试
- * @return 考试列表
- */
- List<Exam> findByIsHiddenFalse();
- }
|