|
|
|
@ -40,13 +40,13 @@ public interface ToBuysRepository extends JpaRepository<ToBuys, Integer> { |
|
|
|
|
ToBuys findByTobuyId(Long tobuyId); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 指定されたユーザーIDに基づいて「買うもの」リストを取得する |
|
|
|
|
* 指定されたユーザーIDに基づいて「買うもの」リストを取得する_(tobuyIdの順番) |
|
|
|
|
* |
|
|
|
|
* @param userId ユーザーID |
|
|
|
|
* @return 「買うもの」リスト |
|
|
|
|
*/ |
|
|
|
|
@Query("SELECT t FROM ToBuys t WHERE t.user.id = ?1") |
|
|
|
|
List<ToBuys> findByUserIdOrderByTobuyIdAsc(Long userId); |
|
|
|
|
@Query("SELECT t FROM ToBuys t WHERE t.user.id = :userId ORDER BY t.tobuyId ASC") |
|
|
|
|
List<ToBuys> findByUserIdOrderByTobuyIdAsc(@Param("userId") Long userId); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 指定された「買うもの」IDに基づいて「買うもの」リストを削除 |
|
|
|
|