Skip to content

Commit

Permalink
🚀 [Deploy] - ResponseDTO 반영 (#34)
Browse files Browse the repository at this point in the history
* Feat: customException 구현

* Feat: responseDto 구현

* Feat: 내 근처 킥보드 주차장 찾기 API 구현

* Fix: BoardingRecord 도메인 수정

* Feat: Spring Security, JWT Cookie, 소셜 로그인 기능 구현

* Feat: Spring Security, JWT Cookie, 소셜 로그인 기능 구현

* Fix: 코드 에러 수정

* Refactor: 아직 사용하지 않는 코드 삭제

* Feat: oauth2 의존성 추가

* Chore: Credentials 추가

* ✨ [Feature] - 서버 날짜 설정 및 유저 닉네임 설정 (#15)

* Feat: 스프링 서버 시간 한국으로 설정

* Feat: 사용자 닉네임 지정 로직 추가

* Fix: 초기 포인트 설정

* Fix: nickname 에러 수정 (#18)

* Fix: BoardingRecord 도메인 수정

* Feat: 디펜던시 추가

* Feat: ErrorCode 추가

* Feat: Image API 구현

* Feat: WebClientConfig 구현

* Feat: S3ClientConfig 구현

* Feat: BoardingRecord API 구현

* Feat: 주차장 예측 결과 관련 기능 추가

* Feat: 탑승 기록 저장 API 구현

* Fix: 디렉토리 경로 수정

* Feat: 코드 리팩터링 진행

* Chore: Credentials 수정 (#29)

* !HOTFIX: 서브 모듈 컨플릭트 해결

* ✨ [Feature] - Reissue 토큰 기능 추가 (#31)

* Chore: Credentials 수정

* Feat: Reissue 토큰 기능 구현

* Chore: Credentials 추가

* Fix: JsonProperty 추가

---------

Co-authored-by: JeongHeumChoi <[email protected]>
Co-authored-by: JeongHeumChoi <[email protected]>
  • Loading branch information
3 people committed May 9, 2024
1 parent d2e0c3d commit 0a736ba
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
package ice.spot.dto.boardingrecord.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import ice.spot.dto.user.response.PersonResponse;
import lombok.Builder;

import java.util.List;

@Builder
public record BoardingRecordListResponse(
@JsonProperty("person")
PersonResponse personResponse,

@JsonProperty("records")
List<BoardingRecordResponse> boardingRecordResponseList
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package ice.spot.dto.parkingLot.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Builder;

import java.util.List;

@Builder
public record ParkingLotResponseList(
@JsonProperty("parkingLotList")
List<ParkingLotResponse> parkingLotResponseList
) {
public static ParkingLotResponseList of(final List<ParkingLotResponse> parkingLotResponse) {
return ParkingLotResponseList.builder()
.parkingLotResponseList(parkingLotResponse)
.build();
}
}
5 changes: 3 additions & 2 deletions src/main/java/ice/spot/service/ParkingLotService.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ice.spot.service;

import ice.spot.dto.parkingLot.response.ParkingLotResponse;
import ice.spot.dto.parkingLot.response.ParkingLotResponseList;
import ice.spot.repository.ParkingLotRepository;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand All @@ -19,7 +20,7 @@ public class ParkingLotService {
private final ParkingLotRepository parkingLotRepository;

@Transactional(readOnly = true)
public List<ParkingLotResponse> parkingLotList(Double lat, Double lon) {
public ParkingLotResponseList parkingLotList(Double lat, Double lon) {

List<ParkingLotResponse> parkingLotResponseList = new ArrayList<>(parkingLotRepository.findAll().stream()
.map(parkingLot -> ParkingLotResponse.builder()
Expand All @@ -41,6 +42,6 @@ public int compare(ParkingLotResponse o1, ParkingLotResponse o2) {
}
});

return parkingLotResponseList.subList(0, 5);
return ParkingLotResponseList.of(parkingLotResponseList.subList(0, 5));
}
}

0 comments on commit 0a736ba

Please sign in to comment.