|
@@ -17,8 +17,12 @@ public interface PictureRepository extends BaseRepository<PictureEntity, String>
|
|
|
countQuery = "select * from t_picture_info where 1=1 and if(?1 is not null and ?1 !='',(category = ?1),1=1) ", nativeQuery = true)
|
|
|
Page<PictureEntity> findPictureList(String category, PageRequest of);
|
|
|
|
|
|
- @Query(value = "select * from t_picture_info ORDER BY RAND() LIMIT 1 ",nativeQuery = true)
|
|
|
+ @Query(value = "select * from t_picture_info where category in ('1','2','3','4','5','6') ORDER BY RAND() LIMIT 1 ",nativeQuery = true)
|
|
|
PictureEntity recommendPicture();
|
|
|
|
|
|
PictureEntity findPictureByCategory(String category);
|
|
|
+
|
|
|
+ @Query(value = "select * from t_picture_info where category not in ('1','2','3','4','5','6') ",
|
|
|
+ countQuery = "select * from t_picture_info where category not in ('1','2','3','4','5','6') ", nativeQuery = true)
|
|
|
+ Page<PictureEntity> findPictureOtherList(PageRequest of);
|
|
|
}
|