-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[fix] 해당 유저의 스케쥴인지, 해당 스케쥴의 단계인지 확인하는 로직 추가
- Loading branch information
Showing
3 changed files
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/main/java/com/example/letscareer/schedule/repository/ScheduleRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
package com.example.letscareer.schedule.repository; | ||
|
||
import com.example.letscareer.schedule.domain.Schedule; | ||
import com.example.letscareer.user.domain.User; | ||
import io.lettuce.core.dynamic.annotation.Param; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.util.Optional; | ||
|
||
@Repository | ||
public interface ScheduleRepository extends JpaRepository<Schedule, Long> { | ||
Page<Schedule> findAllByUserUserIdAndAlwaysTrue(Long userId, Pageable pageable); | ||
|
||
Optional<Schedule> findByUserAndScheduleId(User user, Long scheduleId); | ||
} |