diff --git a/src/main/java/com/pawwithu/connectdog/domain/application/dto/response/ApplicationIntermediaryCompletedResponse.java b/src/main/java/com/pawwithu/connectdog/domain/application/dto/response/ApplicationIntermediaryCompletedResponse.java index cb10a139..f7a25880 100644 --- a/src/main/java/com/pawwithu/connectdog/domain/application/dto/response/ApplicationIntermediaryCompletedResponse.java +++ b/src/main/java/com/pawwithu/connectdog/domain/application/dto/response/ApplicationIntermediaryCompletedResponse.java @@ -1,15 +1,24 @@ package com.pawwithu.connectdog.domain.application.dto.response; import com.fasterxml.jackson.annotation.JsonFormat; +import com.pawwithu.connectdog.domain.dog.entity.DogSize; import java.time.LocalDate; public record ApplicationIntermediaryCompletedResponse(Long postId, String mainImage, String dogName, + String departureLoc, String arrivalLoc, @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "Asia/Seoul") LocalDate startDate, @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "Asia/Seoul") LocalDate endDate, - String departureLoc, String arrivalLoc, - String volunteerName, Long applicationId, - Long reviewId, Long dogStatusId) { + String pickUpTime, + String dogSize, + Boolean isKennel, + Long reviewId) { + public ApplicationIntermediaryCompletedResponse(Long postId, String mainImage, String dogName, + String departureLoc, String arrivalLoc, LocalDate startDate, LocalDate endDate, + String pickUpTime, DogSize dogSize, Boolean isKennel, Long reviewId) { + this(postId, mainImage, dogName, departureLoc, arrivalLoc, startDate, endDate, pickUpTime, + dogSize.getKey(), isKennel, reviewId); + } } diff --git a/src/main/java/com/pawwithu/connectdog/domain/application/repository/impl/CustomApplicationRepositoryImpl.java b/src/main/java/com/pawwithu/connectdog/domain/application/repository/impl/CustomApplicationRepositoryImpl.java index ea0e2855..83f72866 100644 --- a/src/main/java/com/pawwithu/connectdog/domain/application/repository/impl/CustomApplicationRepositoryImpl.java +++ b/src/main/java/com/pawwithu/connectdog/domain/application/repository/impl/CustomApplicationRepositoryImpl.java @@ -153,13 +153,13 @@ public List getVolunteerCompletedApplicat public List getIntermediaryCompletedApplications(Long intermediaryId, Pageable pageable) { return queryFactory .select(Projections.constructor(ApplicationIntermediaryCompletedResponse.class, - post.id, postImage.image, dog.name, post.startDate, post.endDate, post.departureLoc, post.arrivalLoc, - volunteer.name, application.id, review.id, dogStatus.id)) + post.id, postImage.image, dog.name, post.departureLoc, post.arrivalLoc, + post.startDate, post.endDate, post.pickUpTime, + dog.size, post.isKennel, review.id)) .from(application) .join(application.post, post) .join(application.post.mainImage, postImage) .join(application.post.dog, dog) - .join(application.volunteer, volunteer) .leftJoin(review).on(post.id.eq(review.post.id)) .leftJoin(dogStatus).on(post.id.eq(dogStatus.post.id)) .where(application.status.eq(ApplicationStatus.COMPLETED)