Skip to content

Commit

Permalink
hotfix: 입금자명으로 검색되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
0703kyj committed Jan 13, 2025
1 parent 50f0f7f commit 6450a84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public Boolean isSupport(TicketSearchType searchType) {
@Override
@Transactional(readOnly = true)
public Page<CheckTicketDto> search(SearchRequest searchRequest, Pageable pageable) {
Page<Ticket> tickets = ticketRepository.findByUserUserDetailsDepositorName(searchRequest.userName(), pageable);
Page<Ticket> tickets = ticketRepository.findByDepositorName(searchRequest.userName(), pageable);
return tickets.map(CheckTicketDto::from);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public interface TicketRepository extends JpaRepository<Ticket,Long> {

Page<Ticket> findByStatus(TicketStatus status, Pageable pageable);

Page<Ticket> findByUserUserDetailsDepositorName(String userName, Pageable pageable);
@Query("SELECT t FROM Ticket t WHERE t.user.userDetails.depositorName LIKE %:depositorName")
Page<Ticket> findByDepositorName(String depositorName, Pageable pageable);

@Query("SELECT t FROM Ticket t WHERE t.user.userDetails.phoneNumber LIKE %:lastFourDigits")
Page<Ticket> findByPhoneNumberEndingWith(@Param("lastFourDigits") String lastFourDigits, Pageable pageable);
Expand Down

0 comments on commit 6450a84

Please sign in to comment.