From d4c816958e2a39029215b4b2e86bacfd4b645a6c Mon Sep 17 00:00:00 2001 From: yel-m Date: Wed, 8 May 2024 19:50:31 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20Location=20=EC=97=94=ED=8B=B0?= =?UTF-8?q?=ED=8B=B0=EC=9D=98=20=EC=9C=84=EB=8F=84,=20=EA=B2=BD=EB=8F=84?= =?UTF-8?q?=20=EC=86=8D=EC=84=B1=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/record/converter/RecordConverter.java | 4 ++-- .../happinessql/domain/record/domain/Location.java | 10 +++++----- .../domain/record/dto/RecordCreateRequestDto.java | 6 ++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/hobak/happinessql/domain/record/converter/RecordConverter.java b/src/main/java/com/hobak/happinessql/domain/record/converter/RecordConverter.java index 5d7443d..2a96458 100644 --- a/src/main/java/com/hobak/happinessql/domain/record/converter/RecordConverter.java +++ b/src/main/java/com/hobak/happinessql/domain/record/converter/RecordConverter.java @@ -28,8 +28,8 @@ public static Location toLocation(RecordCreateRequestDto recordRequestDto, Recor .city(recordRequestDto.getCity()) .country(recordRequestDto.getCountry()) .district(recordRequestDto.getDistrict()) - .xPos(recordRequestDto.getXPos()) - .yPos(recordRequestDto.getYPos()) + .latitude(recordRequestDto.getLatitude()) + .longitude(recordRequestDto.getLongitude()) .record(record) .build(); } diff --git a/src/main/java/com/hobak/happinessql/domain/record/domain/Location.java b/src/main/java/com/hobak/happinessql/domain/record/domain/Location.java index 406e1a2..00538dd 100644 --- a/src/main/java/com/hobak/happinessql/domain/record/domain/Location.java +++ b/src/main/java/com/hobak/happinessql/domain/record/domain/Location.java @@ -31,23 +31,23 @@ public class Location extends BaseTimeEntity { private String district; @Column(nullable = false) - private Double xPos; + private Double latitude; @Column(nullable = false) - private Double yPos; + private Double longitude; @OneToOne @JoinColumn(name = "record_id", nullable = false) private Record record; @Builder - public Location(String fullName, String country, String city, String district, Double xPos, Double yPos, Record record) { + public Location(String fullName, String country, String city, String district, Double latitude, Double longitude, Record record) { this.fullName = fullName; this.country = country; this.city = city; this.district = district; - this.xPos = xPos; - this.yPos = yPos; + this.latitude = latitude; + this.longitude = longitude; this.record = record; } } diff --git a/src/main/java/com/hobak/happinessql/domain/record/dto/RecordCreateRequestDto.java b/src/main/java/com/hobak/happinessql/domain/record/dto/RecordCreateRequestDto.java index e027756..408b40b 100644 --- a/src/main/java/com/hobak/happinessql/domain/record/dto/RecordCreateRequestDto.java +++ b/src/main/java/com/hobak/happinessql/domain/record/dto/RecordCreateRequestDto.java @@ -33,10 +33,8 @@ public class RecordCreateRequestDto { private String district; @NotNull - @JsonProperty("x_pos") - private Double xPos; + private Double latitude; @NotNull - @JsonProperty("y_pos") - private Double yPos; + private Double longitude; }