-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
150 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/project/backend/domain/place/controller/PlacesController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package project.backend.domain.place.controller; | ||
|
||
import io.swagger.annotations.Api; | ||
import io.swagger.annotations.ApiOperation; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.*; | ||
import project.backend.domain.place.dto.PlaceRetrieveDto; | ||
import project.backend.domain.place.service.PlaceService; | ||
|
||
import java.util.List; | ||
|
||
@Api(tags = "Place - 장소") | ||
@RestController | ||
@RequestMapping("/api/places") | ||
@RequiredArgsConstructor | ||
public class PlacesController { | ||
private final PlaceService placeService; | ||
|
||
@ApiOperation(value = "장소 리스트 조회") | ||
@GetMapping | ||
public ResponseEntity getPlaces( | ||
@RequestParam String search, | ||
@RequestParam(defaultValue = "1") int page, | ||
@RequestParam(defaultValue = "10") int size | ||
) { | ||
List<PlaceRetrieveDto> placeRetrieveDtos = placeService.getKakaoPlaces(search, page, size); | ||
return ResponseEntity.status(HttpStatus.OK).body(placeRetrieveDtos); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/project/backend/domain/place/dto/CrawlPlaceCreateDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package project.backend.domain.place.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.*; | ||
|
||
// Main Section | ||
@Getter | ||
@Setter | ||
public class CrawlPlaceCreateDto { | ||
@JsonProperty("placeName") | ||
private String name; | ||
|
||
@JsonProperty("placeAddress") | ||
private String address; | ||
|
||
@JsonProperty("latitude") | ||
private Double latitude; | ||
|
||
@JsonProperty("longitude") | ||
private Double longitude; | ||
} |
10 changes: 2 additions & 8 deletions
10
src/main/java/project/backend/domain/place/dto/PlaceCreateDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
package project.backend.domain.place.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.*; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
// Main Section | ||
@Getter | ||
@Setter | ||
public class PlaceCreateDto { | ||
@JsonProperty("placeName") | ||
private String name; | ||
|
||
@JsonProperty("placeAddress") | ||
private String address; | ||
|
||
@JsonProperty("latitude") | ||
private Double latitude; | ||
|
||
@JsonProperty("longitude") | ||
private Double longitude; | ||
} |
17 changes: 0 additions & 17 deletions
17
src/main/java/project/backend/domain/place/dto/PlacePostRequestDto.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters