zoujiajian 1 tahun lalu
induk
melakukan
a44332bb75

+ 2 - 1
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

@@ -2300,6 +2300,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 		BigDecimal first_money = orderDon.getMoney();
 		//礼品卡现金支付 不参与其他优惠
 		if (subsidyId == null && gcCash != null && gcCash.compareTo(BigDecimal.ZERO) > 0) {
+			List<Long> userIdList = userBindRelationService.getRelationUserIdList(user.getId(), user);
 			if (CollUtil.isEmpty(gcpIds)) {
 				throw BusinessRuntimeException.getInstance("礼品卡现金支付参数异常");
 			}
@@ -2308,7 +2309,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 				gcCash = money;
 			}
 			List<GiftCardUserRecord> availableGiftCards = giftCardUserRecordService.list(Wrappers.lambdaQuery(GiftCardUserRecord.class)
-					.eq(GiftCardUserRecord::getToUserId, user.getId())
+					.in(GiftCardUserRecord::getToUserId, userIdList)
 					.in(GiftCardUserRecord::getId, gcpIds)
 					.eq(GiftCardUserRecord::getIsPay, true)
 					.eq(GiftCardUserRecord::getGcType, 1)