|
|
@@ -120,9 +120,8 @@ public class UserController {
|
|
|
personalView.setIsNoPayment(orderDon != null ? true : false);
|
|
|
//礼品卡可用数量
|
|
|
Number numOfGiftCard = beanSearcher.searchCount(GiftCardUserRecordView.class, MapUtils.builder()
|
|
|
- .put("uid", String.format("(user_id = %s or to_user_id = %s)", userId, userId))
|
|
|
+ .put("uid", String.format("((user_id = %s and is_send = 0) or (to_user_id = %s and is_used = 0))", userId, userId))
|
|
|
.field(GiftCardUserRecordView::getIsPay, true)
|
|
|
- .field(GiftCardUserRecordView::getIsUsed, false)
|
|
|
.build());
|
|
|
personalView.setNumOfGiftCard(numOfGiftCard.intValue());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(personalView);
|