-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…cts-controller 지난 주 인기 프로젝트 목록 조회(배너용) 구현
- Loading branch information
Showing
20 changed files
with
341 additions
and
100 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/main/java/sixgaezzang/sidepeek/auth/dto/request/LoginRequest.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
2 changes: 1 addition & 1 deletion
2
src/main/java/sixgaezzang/sidepeek/auth/dto/request/ReissueTokenRequest.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
2 changes: 1 addition & 1 deletion
2
...th/exeption/message/AuthErrorMessage.java → ...h/exception/message/AuthErrorMessage.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
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
9 changes: 0 additions & 9 deletions
9
src/main/java/sixgaezzang/sidepeek/common/exception/InvalidAuthorityException.java
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
src/main/java/sixgaezzang/sidepeek/common/util/component/DateTimeProvider.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,28 @@ | ||
package sixgaezzang.sidepeek.common.util.component; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class DateTimeProvider { | ||
|
||
/** | ||
* 현재 날짜를 반환하는 메서드 | ||
* | ||
* @return {@code LocalDate} | ||
*/ | ||
public LocalDate getCurrentDate() { | ||
return LocalDate.now(); | ||
} | ||
|
||
/** | ||
* 현재 날짜, 시간를 반환하는 메서드 | ||
* | ||
* @return {@code LocalDateTime} | ||
*/ | ||
public LocalDateTime getCurrentDateTime() { | ||
return LocalDateTime.now(); | ||
} | ||
|
||
} |
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
29 changes: 29 additions & 0 deletions
29
src/main/java/sixgaezzang/sidepeek/projects/dto/response/ProjectBannerResponse.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,29 @@ | ||
package sixgaezzang.sidepeek.projects.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
import sixgaezzang.sidepeek.projects.domain.Project; | ||
|
||
@Schema(description = "배너용 프로젝트 응답") | ||
@Builder | ||
public record ProjectBannerResponse( | ||
@Schema(description = "프로젝트 식별자", example = "1") | ||
Long id, | ||
@Schema(description = "프로젝트 제목", example = "사이드픽👀") | ||
String name, | ||
@Schema(description = "프로젝트 부제목", example = "요즘 사이드 플젝 뭐함? 사이드픽 \uD83D\uDC40") | ||
String subName, | ||
@Schema(description = "프로젝트 썸네일 이미지 URL", example = "https://sidepeek.image/imageeUrl") | ||
String thumbnailUrl | ||
) { | ||
|
||
public static ProjectBannerResponse from(Project project) { | ||
return ProjectBannerResponse.builder() | ||
.id(project.getId()) | ||
.name(project.getName()) | ||
.subName(project.getSubName()) | ||
.thumbnailUrl(project.getThumbnailUrl()) | ||
.build(); | ||
} | ||
|
||
} |
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
Oops, something went wrong.