Skip to content

Commit

Permalink
Merge pull request #93 from lcj1204/develop
Browse files Browse the repository at this point in the history
코드 정리
  • Loading branch information
lcj1204 authored Dec 10, 2024
2 parents 0afefc3 + 44f8f48 commit 7f3d53c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
@NoArgsConstructor
public class RespPotSimInfoPotMngrCntrDto {
private Long potholeId;
private String roadAddress;
private double lat;
private double lon;
private String roadAddress;
private String roadName; // 도로명
private String roadNumber; // 도로 번호
private String zipCode; // 우편 번호
private String thumbnail;
private Integer importance;
private Integer dangerous;
Expand All @@ -21,9 +24,12 @@ public class RespPotSimInfoPotMngrCntrDto {
@Builder
public RespPotSimInfoPotMngrCntrDto(Pothole pothole) {
this.potholeId = pothole.getPotholeId();
this.roadAddress = pothole.getRoadAddress();
this.lat = pothole.getPoint().getY();
this.lon = pothole.getPoint().getX();
this.roadName = pothole.getRoadName();
this.roadNumber = pothole.getRoadNumber();
this.zipCode = pothole.getZipCode();
this.roadAddress = pothole.getRoadAddress();
this.thumbnail = pothole.getThumbnail();
this.importance = pothole.getImportance();
this.dangerous = pothole.getDangerous();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ public class PotholeManagerController {
private final PotholeHistoryImageManagerService potholeHistoryImageManagerService;
private final RoadAddressSearchService roadAddressSearchService;

@PostMapping("/test")
public BaseResponse<RoadAddress> registerPotholeTest(@Valid @RequestBody ReqPotRegPotMngrServDto reqPotRegPotMngrServDto){
String point = reqPotRegPotMngrServDto.getLat() + "," + reqPotRegPotMngrServDto.getLon();
RoadAddress roadAddress = roadAddressSearchService.getRoadAddress(point);

return new BaseResponse<>(roadAddress);
}

//TODO: 엄밀히 따지면 core 쪽에 있어야 되는거 아닌가?
@PostMapping
public BaseResponse<RespPotSimInfoPotMngrCntrDto> registerPothole(@Valid @RequestPart(value = "registerPothole") ReqPotRegPotMngrServDto reqPotRegPotMngrServDto,
Expand Down

0 comments on commit 7f3d53c

Please sign in to comment.