Skip to content

Commit

Permalink
#84 [refactor] static import 로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
parkheeddong committed Jan 12, 2024
1 parent 57bb2b8 commit 81d5bb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.mile.moim.repository;

import static com.mile.moim.domain.QMoim.moim;
import static com.mile.post.domain.QPost.post;

import com.mile.moim.domain.Moim;
import com.mile.moim.domain.QMoim;
import com.mile.post.domain.QPost;
import com.querydsl.jpa.impl.JPAQueryFactory;
import java.time.LocalDateTime;
import java.util.List;
Expand All @@ -13,8 +14,6 @@ public class MoimRepositoryCustomImpl implements MoimRepositoryCustom {
private final JPAQueryFactory queryFactory;

public List<Moim> findTop3MoimsByPostCount() {
QMoim moim = QMoim.moim;
QPost post = QPost.post;

LocalDateTime oneWeekAgo = LocalDateTime.now().minusWeeks(1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public List<Post> findTop2ByMoimOrderByCuriousCountDesc(final Moim requestMoim)
}

public List<Post> findLatest4PostsByMoim(Moim moim) {
QPost post = QPost.post;

List<Post> result = jpaQueryFactory
.select(post)
Expand Down

0 comments on commit 81d5bb3

Please sign in to comment.