Skip to content

Commit

Permalink
Merge pull request #108 from HowMuchPay/feature101
Browse files Browse the repository at this point in the history
[feature -106] : 지인의 경조사 상세조회 getAcEventDisplayNameWithDetail 추가
  • Loading branch information
seongHyun-Min authored Oct 12, 2023
2 parents 494dbf1 + 5fbf0ff commit b38f4e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/main/java/com/example/howmuch/domain/entity/AcEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,14 @@ public String getAcEventDisplayName() {
}
return eventDisplayName;
}

public String getAcEventDisplayNameWithDetail(){
String eventDisplayName;
if (eventCategory == EventCategory.ETC && eventName != null) {
eventDisplayName = eventName;
} else {
eventDisplayName = eventCategory.getCategoryName();
}
return eventDisplayName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static GetAcEventsResponseDto of(AcEvent acEvent, int dDay) {
.payAmount(acEvent.getPayAmount())
.eventCategory(acEvent.getEventCategory().getValue())
.acType(acEvent.getAcquaintanceType().getValue())
.acEventDisplayName(acEvent.getAcEventDisplayName())
.acEventDisplayName(acEvent.getAcEventDisplayNameWithDetail())
.eventTime(acEvent.getEventTime())
.build();
}
Expand Down

0 comments on commit b38f4e3

Please sign in to comment.