Merge remote-tracking branch 'origin/develop-backend' into feature-frontend-ama

feature-frontend-ama
Amagasu 4 months ago
commit 2bafdec9f6
  1. 6
      backend/src/main/java/com/example/todoapp/repository/ToBuysRepository.java

@ -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に基づいて買うものリストを削除

Loading…
Cancel
Save