-
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
…ttery-event-delete-expectation Feature/#116 admin lottery event delete expectation
- Loading branch information
Showing
5 changed files
with
83 additions
and
21 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
7 changes: 7 additions & 0 deletions
7
...in/event/dto/ResponseDto/lotteryEventResponseDto/LotteryEventExpectationsResponseDto.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package JGS.CasperEvent.domain.event.dto.ResponseDto.lotteryEventResponseDto; | ||
|
||
import java.util.List; | ||
|
||
public record LotteryEventExpectationsResponseDto(List<LotteryEventExpectationResponseDto> expectations, | ||
Boolean isLastPage, long totalExpectations) { | ||
} |
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
7 changes: 6 additions & 1 deletion
7
Server/src/main/java/JGS/CasperEvent/domain/event/repository/CasperBotRepository.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,12 +1,17 @@ | ||
package JGS.CasperEvent.domain.event.repository; | ||
|
||
import JGS.CasperEvent.domain.event.entity.casperBot.CasperBot; | ||
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.data.repository.query.Param; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.util.List; | ||
|
||
@Repository | ||
public interface CasperBotRepository extends JpaRepository<CasperBot, Long> { | ||
List<CasperBot> findByPhoneNumber(String phoneNumber); | ||
@Query("SELECT c FROM CasperBot c WHERE c.phoneNumber = :phoneNumber AND c.isDeleted = false AND c.expectation <> ''") | ||
Page<CasperBot> findByPhoneNumberAndActiveExpectations(@Param("phoneNumber") String phoneNumber, Pageable pageable); | ||
} |
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