|
|
@@ -1612,12 +1612,12 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
//当用户再次点击立即购买时,首先查询当前用户(user_id)下此时当前订单状态是否为(0待支付),
|
|
|
//当前是否为套餐(1),套餐id是多少,且优惠券id不能为空
|
|
|
List<FsStoreOrderScrm> eligibleOrderCoupons = fsStoreOrderMapper.getEligibleOrderCoupons(userId,packageId);
|
|
|
- List<Long> orderCode = eligibleOrderCoupons.stream().filter(Objects::isNull).map(FsStoreOrderScrm::getId).collect(Collectors.toList());
|
|
|
+ List<Long> orderCode = eligibleOrderCoupons.stream().filter(Objects::nonNull).map(FsStoreOrderScrm::getId).collect(Collectors.toList());
|
|
|
List<FsStorePayment> fsStorePaymentList;
|
|
|
if (CollectionUtil.isNotEmpty(orderCode)) {
|
|
|
fsStorePaymentList = fsStoreOrderMapper.getFsStorePayMentScrm(orderCode);
|
|
|
//得到符合条件的订单后,查询汇付是否回调成功
|
|
|
- List<HuiFuQueryOrderResult> queryOrderResultList = null;
|
|
|
+ List<HuiFuQueryOrderResult> queryOrderResultList = new ArrayList<>();
|
|
|
//如果支付明细里面没有,直接取消eligibleOrderCoupons以前的未支付订单
|
|
|
if (CollectionUtil.isNotEmpty(fsStorePaymentList)){
|
|
|
for (int i = 0; i < fsStorePaymentList.size(); i++) {
|
|
|
@@ -1637,10 +1637,8 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
//释放优惠券信息
|
|
|
if (!queryOrderResult.getTrans_stat().equals("S")) {
|
|
|
eligibleOrderCoupons.forEach(n->{
|
|
|
- if (n.getId().equals(fsStorePayment.getBusinessId())){
|
|
|
- cancelOrder(n.getId());
|
|
|
- logger.info("优惠券释放成功");
|
|
|
- }
|
|
|
+ cancelOrder(n.getId());
|
|
|
+ logger.info("优惠券释放成功");
|
|
|
});
|
|
|
}
|
|
|
}
|