修复取消订单误释放商品
This commit is contained in:
@@ -447,6 +447,13 @@ func (r *Repository) AdminRejectRefund(ctx context.Context, orderID uint64, acti
|
||||
if order.Status != orderStatusCancelled {
|
||||
return errors.New("仅已取消的订单可以恢复")
|
||||
}
|
||||
active, err := hasActiveSiblingOrder(tx, order)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if active {
|
||||
return ErrListingUnavailable
|
||||
}
|
||||
order.Status = orderStatusPendingHandoff
|
||||
if order.HandoffStatus == handoffStatusCancelled || order.HandoffStatus == handoffStatusRenterConfirmTimeout {
|
||||
order.HandoffStatus = handoffStatusPendingOwner
|
||||
|
||||
Reference in New Issue
Block a user