From dd2dd0e0cff259207d4ac255071e2895319506a5 Mon Sep 17 00:00:00 2001 From: pgbry645q <3070302691@qq.com> Date: Wed, 26 Jun 2024 08:30:48 +0800 Subject: [PATCH] Add UserRouteRepositor --- UserRouteRepositor | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 UserRouteRepositor diff --git a/UserRouteRepositor b/UserRouteRepositor new file mode 100644 index 0000000..3c3dc42 --- /dev/null +++ b/UserRouteRepositor @@ -0,0 +1,18 @@ +package com.power.travel.repository; + +import com.power.travel.model.TravelRoute; +import com.power.travel.model.User; +import com.power.travel.model.UserRoute; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface UserRouteRepository extends JpaRepository, JpaSpecificationExecutor { + + List findUserRouteByUser(User user); + + UserRoute findUserRouteByTravelRouteAndUser(TravelRoute travelRoute, User user); +}