forked from kookmin-sw/cap-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from kookmin-sw/backend/develop/v3
🐛 영수증 여행 외래키 문제 해결
- Loading branch information
Showing
6 changed files
with
38 additions
and
23 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
19 changes: 12 additions & 7 deletions
19
...nt/moment-server/core/src/main/java/com/moment/core/domain/receipt/ReceiptRepository.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,24 +1,29 @@ | ||
package com.moment.core.domain.receipt; | ||
|
||
import com.moment.core.domain.cardView.CardView; | ||
import com.moment.core.domain.trip.Trip; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
import java.util.Objects; | ||
import java.util.Optional; | ||
|
||
public interface ReceiptRepository extends PagingAndSortingRepository<Receipt, Long>, JpaRepository<Receipt, Long>{ | ||
|
||
List<Receipt> findAllByTrip_User_Id(Long userId); | ||
Page<Receipt> findAllByTrip_User_IdOrderByStDate(Long userId, Pageable pageable); | ||
// List<Receipt> findAllByTrip_User_Id(Long userId); | ||
Page<Receipt> findAllByUser_IdOrderByStDate(Long userId, Pageable pageable); | ||
// Optional<Receipt> findById(Long id); | ||
|
||
// void deleteAll(List<Receipt> receipts); | ||
|
||
// void save(Receipt receipt); | ||
Long countByTrip_User_Id(Long userId); | ||
// Long countByTrip_User_Id(Long userId); | ||
|
||
// List<Receipt> findAllByTrip(Trip trip); | ||
|
||
List<Receipt> findAllByUser_Id(Long userId); | ||
|
||
Number countByUser_Id(Long userId); | ||
|
||
List<Receipt> findAllByTrip(Trip trip); | ||
} |
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
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