feat(order): 统一网站自交接订单24小时自动完成倒计时
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user