Skip to content

Commit

Permalink
Merge pull request #38 from FinalDoubleTen/BE-66-Refactor-STOMP
Browse files Browse the repository at this point in the history
Be 66 refactor stomp
  • Loading branch information
kdjun99 authored Jan 14, 2024
2 parents fa52fee + bd47cb0 commit 4edf3b0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.tenten.tentenstomp.domain.trip.dto.response.TripItemInfo;
import org.tenten.tentenstomp.domain.trip.entity.Trip;
import org.tenten.tentenstomp.domain.trip.entity.TripItem;
import org.tenten.tentenstomp.global.component.dto.request.TripPlace;

Expand All @@ -20,7 +19,7 @@ public interface TripItemRepository extends JpaRepository<TripItem, Long> {
@Query("SELECT ti FROM TripItem ti JOIN FETCH ti.tourItem WHERE ti.trip.id = :tripId AND ti.visitDate = :visitDate ORDER BY ti.seqNum ASC")
List<TripItem> findTripItemByTripIdAndVisitDate(@Param("tripId") Long tripId, @Param("visitDate") LocalDate visitDate);
@Query("SELECT NEW org.tenten.tentenstomp.global.component.dto.request.TripPlace(" +
"ti.seqNum, ti.transportation, t.longitude, t.latitude, ti.price" +
"ti.id, ti.seqNum, ti.transportation, t.longitude, t.latitude, ti.price" +
") FROM TripItem ti LEFT OUTER JOIN TourItem t ON ti.tourItem.id = t.id WHERE ti.trip.id = :tripId AND ti.visitDate = :visitDate ORDER BY ti.seqNum ASC")
List<TripPlace> findTripPlaceByTripIdAndVisitDate(@Param("tripId") Long tripId, @Param("visitDate") LocalDate visitDate);
}

0 comments on commit 4edf3b0

Please sign in to comment.