|
@@ -234,11 +234,18 @@ public class UserReservationServiceImpl extends ServiceImpl<UserReservationMappe
|
|
|
if (one == null) {
|
|
if (one == null) {
|
|
|
throw new RuntimeException("预约不存在");
|
|
throw new RuntimeException("预约不存在");
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 当订单为未支付时,订单状态变为已关闭
|
|
|
|
|
+ int orderStatus = 4;
|
|
|
|
|
+ if(one.getPaymentStatus()!= null && one.getPaymentStatus() == 0){
|
|
|
|
|
+ orderStatus = 5;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 订单状态置为已取消(4)
|
|
// 订单状态置为已取消(4)
|
|
|
userReservationOrderService.update(
|
|
userReservationOrderService.update(
|
|
|
new LambdaUpdateWrapper<UserReservationOrder>()
|
|
new LambdaUpdateWrapper<UserReservationOrder>()
|
|
|
.eq(UserReservationOrder::getId, one.getId())
|
|
.eq(UserReservationOrder::getId, one.getId())
|
|
|
- .set(UserReservationOrder::getOrderStatus, 4));
|
|
|
|
|
|
|
+ .set(UserReservationOrder::getOrderStatus, orderStatus));
|
|
|
// 预约不再逻辑删除,仅将 status 置为已取消(3)
|
|
// 预约不再逻辑删除,仅将 status 置为已取消(3)
|
|
|
return this.update(new LambdaUpdateWrapper<UserReservation>()
|
|
return this.update(new LambdaUpdateWrapper<UserReservation>()
|
|
|
.eq(UserReservation::getId, one.getReservationId())
|
|
.eq(UserReservation::getId, one.getReservationId())
|