Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

코드 정리 #93

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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