add woodpecker.yml
This commit is contained in:
parent
95376a2369
commit
83a52030f5
6
.woodpecker.yml
Normal file
6
.woodpecker.yml
Normal file
@ -0,0 +1,6 @@
|
||||
# .woodpecker.yml
|
||||
pipeline:
|
||||
build:
|
||||
image: maven:3-jdk-11
|
||||
commands:
|
||||
- mvn clean package -P db-mariadb
|
@ -90,10 +90,10 @@ public class CommentManager {
|
||||
*/
|
||||
public Page<Comment> fetchFlagged(int page, int size, boolean asc) {
|
||||
Sort sort = Sort.by(asc ? Order.asc("created") : Order.desc("created"));
|
||||
JPAQuery<Comment> query = jpaQueryFactory.selectFrom(qComment).leftJoin(qFlag).on(qComment.id.eq(qFlag.target))
|
||||
.where(qFlag.targetType.eq(Types.comment)).groupBy(qFlag.target);
|
||||
JPAQuery<Comment> query = jpaQueryFactory.selectFrom(qComment).innerJoin(qFlag).on(qComment.id.eq(qFlag.target))
|
||||
.where(qFlag.targetType.eq(Types.comment)).groupBy(qFlag.target).distinct();
|
||||
|
||||
JPAQuery<Long> countQuery = query.clone().select(qComment.id.countDistinct());
|
||||
JPAQuery<Long> countQuery = query.clone().select(qComment.countDistinct());
|
||||
|
||||
Long count = countQuery.fetchOne();
|
||||
|
||||
|
@ -409,10 +409,10 @@ public class EntryManager {
|
||||
*/
|
||||
public Page<Entry> fetchFlagged(int page, int size, boolean asc) {
|
||||
Sort sort = Sort.by(asc ? Order.asc("created") : Order.desc("created"));
|
||||
JPAQuery<Entry> query = jpaQueryFactory.selectFrom(qEntry).leftJoin(qFlag).on(qEntry.id.eq(qFlag.target))
|
||||
.where(qFlag.targetType.eq(Types.entry)).groupBy(qFlag.target);
|
||||
JPAQuery<Entry> query = jpaQueryFactory.selectFrom(qEntry).innerJoin(qFlag).on(qEntry.id.eq(qFlag.target))
|
||||
.where(qFlag.targetType.eq(Types.entry)).groupBy(qFlag.target).distinct();
|
||||
|
||||
JPAQuery<Long> countQuery = query.clone().select(qEntry.id.countDistinct());
|
||||
JPAQuery<Long> countQuery = query.clone().select(qEntry.countDistinct());
|
||||
|
||||
Long count = countQuery.fetchOne();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user