-
Notifications
You must be signed in to change notification settings - Fork 0
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
29 additions
and
27 deletions.
There are no files selected for viewing
7 changes: 1 addition & 6 deletions
7
src/main/java/side/onetime/repository/EventParticipationRepository.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,19 +1,14 @@ | ||
package side.onetime.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
import side.onetime.domain.Event; | ||
import side.onetime.domain.EventParticipation; | ||
import side.onetime.domain.User; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface EventParticipationRepository extends JpaRepository<EventParticipation,Long> { | ||
List<EventParticipation> findAllByEvent(Event event); | ||
List<EventParticipation> findAllByUser(User user); | ||
@Query("SELECT COUNT(ep) FROM EventParticipation ep WHERE ep.event = :event") | ||
int countByEvent(@Param("event") Event event); | ||
Optional<EventParticipation> findByUserAndEvent(User user, Event event); | ||
EventParticipation findByUserAndEvent(User user, Event event); | ||
} |
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