-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: 함수명 수정 (link --> url) * refactor: 함수명 수정 (link --> url) * feat: 랭킹 결과에 링크 정보 포함 * refactor: RankingRepository --> RankingApi 로 이름 변경
- Loading branch information
1 parent
7e03b39
commit b4aa9b9
Showing
7 changed files
with
84 additions
and
21 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
...echpick-api/src/main/java/techpick/api/application/ranking/dto/LinkInfoWithViewCount.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,16 @@ | ||
package techpick.api.application.ranking.dto; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
import techpick.core.dto.UrlWithCount; | ||
|
||
/** | ||
* 랭킹 서버로 부터 얻은 URL 정보 {@link UrlWithCount} 에 Opengraph Tag를 추가한 DTO | ||
*/ | ||
public record LinkInfoWithViewCount( | ||
@NotNull String url, | ||
String title, | ||
String description, | ||
String imageUrl, | ||
Long count | ||
) { | ||
} |
20 changes: 20 additions & 0 deletions
20
...end/techpick-api/src/main/java/techpick/api/application/ranking/dto/RankingApiMapper.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,20 @@ | ||
package techpick.api.application.ranking.dto; | ||
|
||
import org.mapstruct.InjectionStrategy; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.Mapping; | ||
import org.mapstruct.ReportingPolicy; | ||
|
||
import techpick.api.domain.link.dto.LinkInfo; | ||
import techpick.core.dto.UrlWithCount; | ||
|
||
@Mapper( | ||
componentModel = "spring", | ||
injectionStrategy = InjectionStrategy.CONSTRUCTOR, | ||
unmappedTargetPolicy = ReportingPolicy.ERROR | ||
) | ||
public interface RankingApiMapper { | ||
|
||
@Mapping(target = "url", source = "urlWithCount.url") | ||
LinkInfoWithViewCount toRankingWithLinkInfo(UrlWithCount urlWithCount, LinkInfo linkInfo); | ||
} |
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