Skip to content

Commit

Permalink
fix: 발급된 쿠폰 조회 오류 (#489)
Browse files Browse the repository at this point in the history
* fix: null처리

* feat: yml local값

* feat: 전체 조회 고려
  • Loading branch information
AlmondBreez3 authored Jul 20, 2024
1 parent c42e9e2 commit a8f3f5e
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,17 @@ protected BooleanExpression eqCouponName(String couponName) {
}

protected BooleanExpression hasUsed(Boolean hasUsed) {
return hasUsed != null ? issuedCoupon.usedAt.isNotNull() : null;
if (hasUsed == null) {
return null;
}
return hasUsed ? issuedCoupon.usedAt.isNotNull() : issuedCoupon.usedAt.isNull();
}

protected BooleanExpression hasRevoked(Boolean hasRevoked) {
return hasRevoked != null ? issuedCoupon.hasRevoked.isTrue() : null;
if (hasRevoked == null) {
return null;
}
return hasRevoked ? issuedCoupon.hasRevoked.isTrue() : issuedCoupon.hasRevoked.isFalse();
}

protected BooleanBuilder matchesQueryOption(IssuedCouponQueryOption queryOption) {
Expand Down

0 comments on commit a8f3f5e

Please sign in to comment.