|
|
@@ -161,7 +161,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
}
|
|
|
|
|
|
//锁定座位
|
|
|
- setRelation(relation.getId(), payRequest.getUserId());
|
|
|
+ setRelation(relation.getId(), payRequest.getUserId(), goodsDon.getId());
|
|
|
relation.setUserId(user.getId());
|
|
|
relation.setStatus(GroupsRelation.Status.locking);
|
|
|
groupsRelationMapper.updateById(relation);
|
|
|
@@ -484,8 +484,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
return orderDonMapper.getAppleOneOrderDons(appleOne, skuIds, noOrderStatus, yesZeroDate, thisZeroDate);
|
|
|
}
|
|
|
|
|
|
- public void setRelation(Long relationId, Long userId) {
|
|
|
- int noPayCount = count(Wrappers.lambdaQuery(OrderDon.class).eq(OrderDon::getUserId, userId).eq(OrderDon::getStatus, OrderDon.Status.noPayment.toString()));
|
|
|
+ public void setRelation(Long relationId, Long userId, Long goodsId) {
|
|
|
+ int noPayCount = count(Wrappers.lambdaQuery(OrderDon.class).eq(OrderDon::getUserId, userId).eq(OrderDon::getGoodsId, goodsId).eq(OrderDon::getStatus, OrderDon.Status.noPayment.toString()));
|
|
|
|
|
|
if (noPayCount > 0) {
|
|
|
throw new BusinessRuntimeException("您有未支付订单.");
|