feat(order): 统一网站自交接订单24小时自动完成倒计时

This commit is contained in:
yml
2026-11-30 17:05:49 +08:00
parent 295c88dd2f
commit 2992885a6d
32 changed files with 996 additions and 23 deletions
@@ -415,6 +415,12 @@ func (r *Repository) ConfirmPaidFromChannelTx(tx *gorm.DB, orderID uint64) (uint
order.Status = orderStatusPendingHandoff
order.HandoffStatus = handoffStatusPendingOwner
order.HandoffStartedAt = &now
if !isPlatformHandoffOrder(*order) && !isPlatformSettlementOrder(*order) {
if timeoutMinutes := autoCompleteHandoffTimeoutMinutesForOrder(tx, *order); timeoutMinutes > 0 {
deadline := now.Add(time.Duration(timeoutMinutes) * time.Minute)
order.HandoffDeadlineAt = &deadline
}
}
if err := markAssetsRented(tx, listing, account); err != nil {
return 0, err
}