修复驳回退款恢复订单时交接进度被重置的问题
- 取消订单时从待交接状态取消不再覆盖 handoff_status,保留原有交接进度 - 驳回恢复时仅在 cancelled 或 renter_confirm_timeout 时重置为 pending_owner
This commit is contained in:
@@ -410,7 +410,9 @@ func (r *Repository) AdminRejectRefund(ctx context.Context, orderID uint64, acti
|
||||
return errors.New("仅已取消的订单可以恢复")
|
||||
}
|
||||
order.Status = orderStatusPendingHandoff
|
||||
order.HandoffStatus = handoffStatusPendingOwner
|
||||
if order.HandoffStatus == handoffStatusCancelled || order.HandoffStatus == handoffStatusRenterConfirmTimeout {
|
||||
order.HandoffStatus = handoffStatusPendingOwner
|
||||
}
|
||||
order.SettlementStatus = settlementStatusUnsettled
|
||||
order.SettledAt = nil
|
||||
reserveListingForOrder(listing)
|
||||
|
||||
Reference in New Issue
Block a user