-
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
* ✨ feature/#16 : 5.2 온기 우편함 조회 response dto 정의 Signed-off-by: EunJiJung <[email protected]> * ♻️ refactor/#16 : 온기우편함 response dto에 onjungtype 추가 Signed-off-by: EunJiJung <[email protected]> * ✨ feature/#16 : onjung type enum 추가 Signed-off-by: EunJiJung <[email protected]> * ✨ feature/#16 : 5.2 온기 우편함 조회 http 메서드 정의 Signed-off-by: EunJiJung <[email protected]> * 🐞 bugfix/#16 : datetime util 네이밍 변경 Signed-off-by: EunJiJung <[email protected]> * 🐞 bugfix/#16 : EventDto 매핑 에러 픽스 Signed-off-by: EunJiJung <[email protected]> * 🔨 merge/#16 : merge dev Signed-off-by: EunJiJung <[email protected]> * ♻️ refactor/#16 : onjung list 조회 service 변경 Signed-off-by: EunJiJung <[email protected]> * ♻️ refactor/#16 : 사용하지 않는 jpa 제거 Signed-off-by: EunJiJung <[email protected]> * ♻️ refactor/#16 : donation, receipt, share 날짜가 포함된 이벤트 기간의 event 가져오기로 변경 Signed-off-by: EunJiJung <[email protected]> * 🐞 bugfix/#16 : 온기우편함 조회 api 버그 픽스 Signed-off-by: EunJiJung <[email protected]> --------- Signed-off-by: EunJiJung <[email protected]>
- Loading branch information
Showing
16 changed files
with
539 additions
and
13 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
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
3 changes: 2 additions & 1 deletion
3
...in/java/com/daon/onjung/company/application/dto/response/ReadCompanyBriefResponseDto.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
151 changes: 151 additions & 0 deletions
151
...va/com/daon/onjung/event/application/dto/response/ReadOnjungEventOverviewResponseDto.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,151 @@ | ||
package com.daon.onjung.event.application.dto.response; | ||
|
||
import com.daon.onjung.account.domain.type.EOnjungTag; | ||
import com.daon.onjung.event.domain.type.EStatus; | ||
import com.daon.onjung.onjung.domain.type.EOnjungType; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
public class ReadOnjungEventOverviewResponseDto { | ||
|
||
@NotNull(message = "has_next는 null일 수 없습니다.") | ||
@JsonProperty("has_next") | ||
private final Boolean hasNext; | ||
|
||
@JsonProperty("event_list") | ||
private final List<EventDto> eventDtos; | ||
|
||
@Builder | ||
public ReadOnjungEventOverviewResponseDto( | ||
Boolean hasNext, | ||
List<EventDto> eventDtos | ||
) { | ||
this.hasNext = hasNext; | ||
this.eventDtos = eventDtos; | ||
} | ||
|
||
public static ReadOnjungEventOverviewResponseDto fromPage( | ||
List<EventDto> eventDtos, | ||
boolean hasNext | ||
) { | ||
|
||
return ReadOnjungEventOverviewResponseDto.builder() | ||
.hasNext(hasNext) | ||
.eventDtos(eventDtos) | ||
.build(); | ||
} | ||
|
||
|
||
@Getter | ||
public static class EventDto { | ||
|
||
@JsonProperty("store_info") | ||
private final StoreInfoDto storeInfo; | ||
|
||
@NotNull(message = "onjung_type은 null일 수 없습니다.") | ||
@JsonProperty("onjung_type") | ||
private final EOnjungType onjungType; | ||
|
||
@NotNull(message = "status는 null일 수 없습니다.") | ||
@JsonProperty("status") | ||
private final EStatus status; | ||
|
||
@JsonProperty("event_period") | ||
private final String eventPeriod; | ||
|
||
@JsonProperty("store_delivery_date") | ||
private final String storeDeliveryDate; | ||
|
||
@JsonProperty("ticket_issue_date") | ||
private final String ticketIssueDate; | ||
|
||
@JsonProperty("report_date") | ||
private final String reportDate; | ||
|
||
@Builder | ||
public EventDto( | ||
StoreInfoDto storeInfo, | ||
EOnjungType onjungType, | ||
EStatus status, | ||
String eventPeriod, | ||
String storeDeliveryDate, | ||
String ticketIssueDate, | ||
String reportDate | ||
) { | ||
this.storeInfo = storeInfo; | ||
this.onjungType = onjungType; | ||
this.status = status; | ||
this.eventPeriod = eventPeriod; | ||
this.storeDeliveryDate = storeDeliveryDate; | ||
this.ticketIssueDate = ticketIssueDate; | ||
this.reportDate = reportDate; | ||
} | ||
|
||
public static EventDto fromEntity( | ||
StoreInfoDto storeInfo, | ||
EOnjungType onjungType, | ||
EStatus status, | ||
String eventPeriod, | ||
String storeDeliveryDate, | ||
String ticketIssueDate, | ||
String reportDate | ||
) { | ||
|
||
return EventDto.builder() | ||
.storeInfo(storeInfo) | ||
.onjungType(onjungType) | ||
.status(status) | ||
.eventPeriod(eventPeriod) | ||
.storeDeliveryDate(storeDeliveryDate) | ||
.ticketIssueDate(ticketIssueDate) | ||
.reportDate(reportDate) | ||
.build(); | ||
} | ||
|
||
|
||
@Getter | ||
public static class StoreInfoDto { | ||
|
||
@NotNull(message = "logo_img_url은 null일 수 없습니다.") | ||
@JsonProperty("logo_img_url") | ||
private final String logoImgUrl; | ||
|
||
@NotNull(message = "title은 null일 수 없습니다.") | ||
@JsonProperty("title") | ||
private final String title; | ||
|
||
@NotNull(message = "name는 null일 수 없습니다.") | ||
@JsonProperty("name") | ||
private final String name; | ||
|
||
@Builder | ||
public StoreInfoDto( | ||
String logoImgUrl, | ||
String title, | ||
String name | ||
) { | ||
this.logoImgUrl = logoImgUrl; | ||
this.title = title; | ||
this.name = name; | ||
} | ||
|
||
public static StoreInfoDto fromEntity( | ||
String logoImgUrl, | ||
String title, | ||
String name | ||
) { | ||
|
||
return StoreInfoDto.builder() | ||
.logoImgUrl(logoImgUrl) | ||
.title(title) | ||
.name(name) | ||
.build(); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.