TQRepository.java 950 B

1234567891011121314151617181920212223242526
  1. package com.es.demo.back;
  2. import org.springframework.data.domain.Page;
  3. import org.springframework.data.domain.Pageable;
  4. import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
  5. import org.springframework.data.rest.core.annotation.RepositoryRestResource;
  6. import java.util.Optional;
  7. /**
  8. * @ClassName TQRepository
  9. * @PackageName com.es.demo.back
  10. * @Author sheen
  11. * @Date 2019/12/15
  12. * @Version 1.0
  13. * @Description //TODO
  14. **/
  15. @RepositoryRestResource(path = "tq")
  16. public interface TQRepository extends ElasticsearchRepository<ChoiceQuestion,Integer> {
  17. Page<ChoiceQuestion> findAll(Pageable pageable);
  18. Page<ChoiceQuestion> findAllByIdBetween( Pageable pageable,Integer start, Integer end);
  19. Page<ChoiceQuestion> findByStemLike(String content,Pageable pageable);
  20. int countAllByIdBetween(Integer id, Integer id2);
  21. void deleteById(Integer integer);
  22. Optional<ChoiceQuestion> findById(Integer integer);
  23. }