package com.ssj.dao.sys.game.dao;

import java.util.List;

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 com.ssj.bean.sys.game.domain.GameQuestion;

/**
 * @author Mount Liu
 * @date 2018/2/19
 */
@Repository
public interface GameQuestionDao extends JpaRepository<GameQuestion, String> {

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

    /**
     * 按照顺序查询当前关卡题目
     *
     * @param level
     * @return
     */
    List<GameQuestion> findByLevelOrderByNumberAsc(int level);
}
