|
|
@ -57,8 +57,9 @@ public interface ActivityDAO extends JpaRepository<Activity,String>, JpaSpecific |
|
|
|
//分页列出案例
|
|
|
|
@Query(value = " select * from tb_activity a where a.state = '2'",nativeQuery = true) |
|
|
|
List<Activity> findByState(Pageable pageable); |
|
|
|
//这个不对
|
|
|
|
@Query(value = "SELECT * FROM tb_activity WHERE state != '-1' ",nativeQuery = true) |
|
|
|
//这个不对 sql上的author呢? 你没有,肯定查所有啊 这段就是我当时不会的那句 yy
|
|
|
|
|
|
|
|
@Query(value = "SELECT * FROM tb_activity WHERE state != '-1' and author = ?",nativeQuery = true) |
|
|
|
Page<Activity> findAllByAuthor(String author ,Pageable pageable); |
|
|
|
|
|
|
|
|
|
|
|