-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from kusitms-28th-Meetup-E/feat/contents
feat(#12) : 좋아요내림차순 조회
- Loading branch information
Showing
7 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/main/java/gwangjang/server/domain/like/domain/repository/LikeRepositoryImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package gwangjang.server.domain.like.domain.repository; | ||
|
||
import com.querydsl.jpa.impl.JPAQueryFactory; | ||
import gwangjang.server.domain.like.domain.entity.ContentLike; | ||
import org.springframework.data.jpa.repository.support.QuerydslRepositorySupport; | ||
|
||
public class LikeRepositoryImpl extends QuerydslRepositorySupport { | ||
|
||
private final JPAQueryFactory jpaQueryFactory; | ||
|
||
public LikeRepositoryImpl(JPAQueryFactory jpaQueryFactory) { | ||
super(ContentLike.class); | ||
this.jpaQueryFactory = jpaQueryFactory; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/gwangjang/server/domain/morpheme/application/dto/res/ContentLikeCountRes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package gwangjang.server.domain.morpheme.application.dto.res; | ||
|
||
import gwangjang.server.domain.morpheme.domain.entity.constant.ApiType; | ||
import lombok.*; | ||
|
||
@Getter | ||
@Builder | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class ContentLikeCountRes { | ||
private Integer contents_id; | ||
private String url; | ||
private String title; | ||
private String description; | ||
ApiType type; | ||
private String issueTitle; | ||
private String keyword; | ||
private String pubDate; | ||
private String topic; | ||
} |
2 changes: 2 additions & 0 deletions
2
...ain/java/gwangjang/server/domain/morpheme/domain/repository/ContentsCustomRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package gwangjang.server.domain.morpheme.domain.repository; | ||
|
||
import gwangjang.server.domain.morpheme.application.dto.res.ContentsDataRes; | ||
import gwangjang.server.domain.morpheme.domain.entity.Contents; | ||
|
||
import java.util.List; | ||
|
||
public interface ContentsCustomRepository { | ||
List<ContentsDataRes> getContentsByIssueId(String issue); | ||
List<Contents> findAllOrderByLikeCountDesc(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters