Skip to content

Commit

Permalink
[fix] 맛집 상세 조회 Reuqest 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
boo105 committed Mar 1, 2024
1 parent ffb648e commit b7f22e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package com.gdsc.jmt.domain.restaurant.query.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
public class FindDetailRestaurantRequest {
private MapLocation userLocation;
@Schema(description = "경도", example = "127.0596")
private String x;
@Schema(description = "위도", example = "37.6633")
private String y;
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private RestaurantEntity findRestaurant(final String kakaoSubId) {
}

public FindDetailRestaurantItem findDetailRestaurant(Long recommendRestaurantId, FindDetailRestaurantRequest request) {
String userLocation = "POINT(" + request.getUserLocation().x() + " " + request.getUserLocation().y() + ")";
String userLocation = "POINT(" + request.getX() + " " + request.getY() + ")";
Optional<RecommendRestaurantWithDistanceDTO> isExisting = recommendRestaurantRepository.findByIdWithUserLocation(recommendRestaurantId, userLocation);
if(isExisting.isEmpty()) {
throw new ApiException(RestaurantMessage.RECOMMEND_RESTAURANT_NOT_FOUND);
Expand Down

0 comments on commit b7f22e2

Please sign in to comment.