-
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.
refactor: 공모글 목록 조회 필터링 수정 및 추가 (#356)
* refactor: 마감임박순 필터링 이름 마감임박만으로 변경 Co-authored-by: fromitive <[email protected]> * refactor: 필터링 쿼리 수정 Co-authored-by: fromitive <[email protected]> * feat: "참여가능만" 필터링 기능 구현 Co-authored-by: fromitive <[email protected]> * feat: "참여가능만" 필터링 기능 연결 Co-authored-by: fromitive <[email protected]> * fix: 쿼리 내 불필요한 파라미터 제거 Co-authored-by: fromitive <[email protected]> * refactor: 할인율이 null일 경우 높은할인율 필터링 대상에서 제외 Co-authored-by: fromitive <[email protected]> * feat: 참여가능만 필터링 전략 클래스 추가 * feat: 공모 목록 조회 API 응답값 변경 * fix: 높은 할인율 단위 변경 및 last-id 필터링 로직 수정 * style: 주석 제거 --------- Co-authored-by: fromitive <[email protected]>
- Loading branch information
Showing
9 changed files
with
71 additions
and
41 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
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
25 changes: 25 additions & 0 deletions
25
...va/com/zzang/chongdae/offering/domain/offeringfetchstrategy/JoinableOfferingStrategy.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,25 @@ | ||
package com.zzang.chongdae.offering.domain.offeringfetchstrategy; | ||
|
||
import com.zzang.chongdae.offering.repository.OfferingRepository; | ||
import com.zzang.chongdae.offering.repository.entity.OfferingEntity; | ||
import java.util.List; | ||
import org.springframework.data.domain.Pageable; | ||
|
||
public class JoinableOfferingStrategy extends OfferingFetchStrategy { | ||
|
||
public JoinableOfferingStrategy(OfferingRepository offeringRepository) { | ||
super(offeringRepository); | ||
} | ||
|
||
@Override | ||
protected List<OfferingEntity> fetchOfferingsWithoutLastId(String searchKeyword, Pageable pageable) { | ||
Long outOfRangeId = findOutOfRangeId(); | ||
return offeringRepository.findJoinableOfferingsWithKeyword(outOfRangeId, searchKeyword, pageable); | ||
} | ||
|
||
@Override | ||
protected List<OfferingEntity> fetchOfferingsWithLastOffering(OfferingEntity lastOffering, String searchKeyword, | ||
Pageable pageable) { | ||
return offeringRepository.findJoinableOfferingsWithKeyword(lastOffering.getId(), searchKeyword, 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
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