订单超时任务系统

This commit is contained in:
yml
2026-05-22 18:16:05 +08:00
parent 55477d0ac6
commit 6f915b37d3
9 changed files with 404 additions and 2 deletions
+1 -1
View File
@@ -308,7 +308,7 @@ func (r *Repository) SubmitReturn(userID uint64, orderID uint64, req SubmitRetur
if order.RenterID != userID {
return ErrPermissionDenied
}
if order.Status != "renting" || order.HandoffStatus != "received" {
if (order.Status != "renting" && order.Status != "overdue") || (order.HandoffStatus != "received" && order.HandoffStatus != "return_overdue") {
return ErrOrderCannotReturn
}
now := time.Now()