diff --git a/src/main/java/com/gdschongik/gdsc/domain/coupon/dao/IssuedCouponQueryMethod.java b/src/main/java/com/gdschongik/gdsc/domain/coupon/dao/IssuedCouponQueryMethod.java index 4ccfac926..3928fa1c8 100644 --- a/src/main/java/com/gdschongik/gdsc/domain/coupon/dao/IssuedCouponQueryMethod.java +++ b/src/main/java/com/gdschongik/gdsc/domain/coupon/dao/IssuedCouponQueryMethod.java @@ -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) {