...
|
...
|
@@ -3,6 +3,7 @@ package com.yoho.datasync.fullsync.dal.repository.grass; |
|
|
import com.yoho.datasync.fullsync.dal.repository.grass.model.GrassArticle;
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
import org.springframework.stereotype.Repository;
|
|
|
|
|
|
import java.util.List;
|
...
|
...
|
@@ -10,8 +11,12 @@ import java.util.List; |
|
|
@Repository
|
|
|
public interface GrassArticleRepository extends JpaRepository<GrassArticle, Integer>{
|
|
|
|
|
|
@Query("select count(article.id) from GrassArticle article where article.createTime >=(?1) and article.createTime<(?2) and article.articleType in (?3)" +
|
|
|
"and article.authStatus in (?4)")
|
|
|
int countByCreateTimeAfterAndCreateTimeBeforeAndArticleTypeInAndAuthStatusIn(long startTime, long endTime,List<Integer> list,List<Integer> statusList);
|
|
|
|
|
|
@Query("select article from GrassArticle article where article.createTime >=(?1) and article.createTime<(?2) and article.articleType in (?3)" +
|
|
|
"and article.authStatus in (?4)")
|
|
|
List<GrassArticle> findAllByCreateTimeAfterAndCreateTimeBeforeAndArticleTypeInAndAuthStatusIn(long startTime, long endTime,List<Integer> list,
|
|
|
List<Integer> statusList, Pageable pageable);
|
|
|
List<GrassArticle> findAllByCreateTimeAfterAndCreateTimeBeforeAndArticleTypeInAndAuthStatusIn(long startTime, long endTime,List<Integer> list,
|
...
|
...
|
|