-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: sosow0212 <[email protected]> Co-authored-by: be-student <[email protected]> Co-authored-by: kiarakim <[email protected]> [#171]
- Loading branch information
Showing
94 changed files
with
893 additions
and
898 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
backend/src/main/java/com/carffeine/carffeine/common/exception/ExceptionResponse.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
6 changes: 5 additions & 1 deletion
6
backend/src/main/java/com/carffeine/carffeine/common/exception/Status.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,5 +1,9 @@ | ||
package com.carffeine.carffeine.common.exception; | ||
|
||
public enum Status { | ||
SERVER_ERROR, INVALID, NOT_FOUND | ||
|
||
SERVER_ERROR, | ||
INVALID, | ||
NOT_FOUND, | ||
; | ||
} |
36 changes: 0 additions & 36 deletions
36
...main/java/com/carffeine/carffeine/controller/chargerStation/ChargerStationController.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...in/java/com/carffeine/carffeine/controller/chargerStation/dto/CongestionInfoResponse.java
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
...d/src/main/java/com/carffeine/carffeine/domain/chargestation/ChargeStationRepository.java
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
...main/java/com/carffeine/carffeine/domain/chargestation/CustomChargeStationRepository.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
...n/java/com/carffeine/carffeine/domain/chargestation/exception/ChargeStationException.java
This file was deleted.
Oops, something went wrong.
6 changes: 5 additions & 1 deletion
6
...mon/exception/GlobalExceptionHandler.java → ...ine/exception/GlobalExceptionHandler.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
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
26 changes: 0 additions & 26 deletions
26
...va/com/carffeine/carffeine/service/chargerstation/ChargeStationPeriodicUpdateService.java
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
.../src/main/java/com/carffeine/carffeine/service/chargerstation/ChargeStationRequester.java
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
...d/src/main/java/com/carffeine/carffeine/service/chargerstation/ChargerStateRequester.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
...in/java/com/carffeine/carffeine/service/chargerstation/ChargerStatusCustomRepository.java
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
...rc/main/java/com/carffeine/carffeine/service/chargerstation/dto/ChargeStationRequest.java
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
...in/java/com/carffeine/carffeine/service/chargerstation/dto/ChargeStationsInfoRequest.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...d/src/main/java/com/carffeine/carffeine/service/chargerstation/dto/StatisticsRequest.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
8 changes: 4 additions & 4 deletions
8
...ller/congestion/CongestionController.java → ...ller/congestion/CongestionController.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
4 changes: 4 additions & 0 deletions
4
...ava/com/carffeine/carffeine/station/controller/congestion/dto/CongestionInfoResponse.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,4 @@ | ||
package com.carffeine.carffeine.station.controller.congestion.dto; | ||
|
||
public record CongestionInfoResponse(int hour, double ratio) { | ||
} |
2 changes: 1 addition & 1 deletion
2
...hargerStation/dto/CongestionResponse.java → ...er/congestion/dto/CongestionResponse.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
2 changes: 1 addition & 1 deletion
2
...hargerStation/dto/StatisticsResponse.java → ...er/congestion/dto/StatisticsResponse.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
36 changes: 36 additions & 0 deletions
36
...d/src/main/java/com/carffeine/carffeine/station/controller/station/StationController.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,36 @@ | ||
package com.carffeine.carffeine.station.controller.station; | ||
|
||
import com.carffeine.carffeine.station.controller.station.dto.StationSpecificResponse; | ||
import com.carffeine.carffeine.station.controller.station.dto.StationsSimpleResponse; | ||
import com.carffeine.carffeine.station.domain.station.Station; | ||
import com.carffeine.carffeine.station.service.station.StationService; | ||
import com.carffeine.carffeine.station.service.station.dto.CoordinateRequest; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import java.util.List; | ||
|
||
@RequiredArgsConstructor | ||
@RequestMapping("/api") | ||
@RestController | ||
public class StationController { | ||
|
||
private final StationService stationService; | ||
|
||
@GetMapping("/stations") | ||
public ResponseEntity<StationsSimpleResponse> getStations(CoordinateRequest request) { | ||
List<Station> stations = stationService.findByCoordinate(request); | ||
StationsSimpleResponse chargerStationsSimpleResponse = StationsSimpleResponse.from(stations); | ||
return ResponseEntity.ok(chargerStationsSimpleResponse); | ||
} | ||
|
||
@GetMapping("/stations/{stationId}") | ||
public ResponseEntity<StationSpecificResponse> getStationById(@PathVariable String stationId) { | ||
Station station = stationService.findStationById(stationId); | ||
return ResponseEntity.ok(StationSpecificResponse.from(station)); | ||
} | ||
} |
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
4 changes: 2 additions & 2 deletions
4
...tion/dto/ChargeStationSimpleResponse.java → ...er/station/dto/StationSimpleResponse.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
Oops, something went wrong.