diff --git a/sever/src/main/java/com/example/rememberdokdo/Repository/StageProgressRepository.java b/sever/src/main/java/com/example/rememberdokdo/Repository/StageProgressRepository.java index 048cfd7..e8d23fa 100644 --- a/sever/src/main/java/com/example/rememberdokdo/Repository/StageProgressRepository.java +++ b/sever/src/main/java/com/example/rememberdokdo/Repository/StageProgressRepository.java @@ -13,6 +13,9 @@ public interface StageProgressRepository extends JpaRepository findBySessionId(String sessionId); + // 특정 세션과 스테이지 ID로 엔티티 찾기 + Optional findBySessionIdAndStageId(String sessionId, int stageId); + // sessionId가 같은 모든 레코드 삭제하는 메서드 @Modifying @Query("DELETE FROM StageProgressEntity p WHERE p.sessionId = :sessionId")