Skip to content

Commit

Permalink
Merge pull request #131 from Hanaro-trip-together-bank/feature/trip
Browse files Browse the repository at this point in the history
feat: 명소(장소) 한국 이름 없는 경우, 영어로 반환
  • Loading branch information
lcw729 authored Jun 5, 2024
2 parents 06eb94f + 89b0e46 commit 80af977
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 80af977

Please sign in to comment.