账号上下架增加统计

This commit is contained in:
yml2213
2026-07-11 23:37:24 +08:00
parent 7614c0980e
commit 42b250cd2c
17 changed files with 792 additions and 27 deletions
+6 -2
View File
@@ -181,7 +181,9 @@ func (r *Repository) ConfirmPaidFromChannelTx(tx *gorm.DB, orderID uint64) (uint
order.Status = orderStatusPendingHandoff
order.HandoffStatus = handoffStatusPendingOwner
order.HandoffStartedAt = &now
markAssetsRented(listing, account)
if err := markAssetsRented(tx, listing, account); err != nil {
return 0, err
}
// 拉租客进发布群(替代原来的建订单群)
conversationID := uint64(0)
@@ -275,7 +277,9 @@ func (r *Repository) Cancel(ctx context.Context, userID uint64, orderID uint64)
); err != nil {
return err
}
releaseAssetsForRental(listing, account)
if err := releaseAssetsForRental(tx, listing, account); err != nil {
return err
}
if err := closePendingOrderPayments(tx, order.ID, "order_cancel"); err != nil {
return err
}