Skip to content

Commit

Permalink
feat: 명소(장소) 한국 이름 없는 경우, 영어로 반환
Browse files Browse the repository at this point in the history
  • Loading branch information
lcw729 committed Jun 5, 2024
1 parent 06eb94f commit 89b0e46
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
import org.springframework.util.StringUtils;

@Entity
@Table(name = "Place")
Expand Down Expand Up @@ -51,10 +52,12 @@ public class PlaceEntity {
private Member deletedBy;

public Place toPlace() {
String placeNameKo = StringUtils.hasText(this.placeNameKo) ? this.placeNameKo : this.placeNameEng;

return Place.builder()
.placeIdx(this.placeIdx)
.cityIdx(this.city.getCityIdx())
.placeNameKo(this.placeNameKo)
.placeNameKo(placeNameKo)
.placeNameEng(this.placeNameEng)
.placeImg(this.placeImg)
.categoryIdx(this.categoryIdx)
Expand Down

0 comments on commit 89b0e46

Please sign in to comment.