|
|
@@ -1111,7 +1111,10 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
throw BusinessRuntimeException.getInstance("订单异常");
|
|
|
}
|
|
|
GoodsDon goodsDon = goodsDonMapper.selectById(orderDon.getGoodsId());
|
|
|
- GoodsDonSku sku = goodsDonSkuMapper.selectById(orderDon.getSkuId());
|
|
|
+ GoodsDonSku sku = null;
|
|
|
+ if (orderDon.getSkuId() != null) {
|
|
|
+ sku = goodsDonSkuMapper.selectById(orderDon.getSkuId());
|
|
|
+ }
|
|
|
orderDon.setStatus(goodsDon.getType() == 1 && goodsDon.getSecondType() == 2 ? OrderDon.Status.complete : OrderDon.Status.hasPayment);
|
|
|
updateGroupsTicket(orderDon, goodsDon, sku);
|
|
|
if (orderDon.getBalance().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
@@ -1123,13 +1126,13 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
|
|
|
public void updateCarParkAndSendMsg(GoodsDon goodsDon, GoodsDonSku sku, OrderDon order) {
|
|
|
if (goodsDon.getType() == 1) {
|
|
|
- log.info("虚物订单orderNo:{}开始更新车票信息", order.getOrderNo());
|
|
|
//修改车位状态
|
|
|
GroupsRelation relation = groupsRelationMapper.selectById(order.getRelationId());
|
|
|
if (relation == null) {
|
|
|
log.info("无需更新车票信息");
|
|
|
return;
|
|
|
}
|
|
|
+ log.info("虚物订单orderNo:{}开始更新车票信息", order.getOrderNo());
|
|
|
if (order.getIsDp()) {
|
|
|
//是否已经发送优惠加购车票
|
|
|
OrderDiscountPlusPurchaseSkuRelation purchaseSkuRelation = orderDiscountPlusPurchaseSkuRelationMapper.selectOne(Wrappers.lambdaQuery(OrderDiscountPlusPurchaseSkuRelation.class)
|
|
|
@@ -1720,11 +1723,11 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
.eq(OrderDon::getStatus, noPayment)
|
|
|
.eq(OrderDon::getId, orderDon.getId()));
|
|
|
if (isSuccess) {
|
|
|
- //更新车位情况
|
|
|
- GoodsDonSku sku = goodsDonSkuMapper.selectById(orderDon.getSkuId());
|
|
|
- //更新座位信息
|
|
|
- updateGroupsTicket(orderDon, goodsDon, sku);
|
|
|
- updateById(orderDon);
|
|
|
+ GoodsDonSku sku = null;
|
|
|
+ if (orderDon.getSkuId() != null) {
|
|
|
+ sku = goodsDonSkuMapper.selectById(orderDon.getSkuId());
|
|
|
+ }
|
|
|
+ unifiedHandlerOrderNotify(orderDon, goodsDon, sku);
|
|
|
return orderDon.getStatus();
|
|
|
}
|
|
|
return noPayment;
|
|
|
@@ -2090,6 +2093,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
.eq(GiftCardOrderRelate::getOrderId, orderDon.getId())
|
|
|
.eq(GiftCardOrderRelate::getIsPay, false).last("limit 1"));
|
|
|
if (giftCardOrderRelate != null) {
|
|
|
+ log.info("该订单:{}是礼品卡类型", orderDon.getId());
|
|
|
int update = giftCardOrderRelateMapper.update(null, Wrappers.lambdaUpdate(GiftCardOrderRelate.class)
|
|
|
.set(GiftCardOrderRelate::getIsPay, true)
|
|
|
.eq(GiftCardOrderRelate::getId, giftCardOrderRelate.getId())
|