接入分销订单支付退款与站点隔离

This commit is contained in:
yml2213
2026-09-05 10:52:36 +08:00
parent 2ffa7a89b1
commit ac67a91438
13 changed files with 299 additions and 27 deletions
+5 -1
View File
@@ -6,6 +6,7 @@ import (
"time"
"hfb_sys/backend/internal/model"
"hfb_sys/backend/internal/modules/distribution"
"hfb_sys/backend/internal/modules/rentergrowth"
"go.uber.org/zap"
@@ -429,7 +430,10 @@ func (r *Repository) updateOrderRefundStatus(ctx context.Context, orderID uint64
return err
}
}
return tx.Save(&order).Error
if err := tx.Save(&order).Error; err != nil {
return err
}
return distribution.ApplyRefundTx(tx, orderID, refundAmountCent)
})
}
func (r *Repository) markOrderRefunding(ctx context.Context, orderID uint64, refundAmountCent int64) error {