修复退款审核前账号提前释放

This commit is contained in:
yml2213
2026-08-20 16:50:32 +08:00
parent cc974f954f
commit 266abb4aaa
5 changed files with 130 additions and 12 deletions
+5 -2
View File
@@ -368,8 +368,11 @@ func (r *Repository) Cancel(ctx context.Context, userID uint64, orderID uint64)
return err
}
}
if err := releaseAssetsForRentalIfIdle(tx, &order, listing, account); err != nil {
return err
// 已付款订单取消后需等待客服审核退款,审核通过前继续占用账号。
if beforeStatus == orderStatusPendingPayment {
if err := releaseAssetsForRentalIfIdle(tx, &order, listing, account); err != nil {
return err
}
}
if err := closePendingOrderPayments(tx, order.ID, "order_cancel"); err != nil {
return err