ignore pay refund

This commit is contained in:
lwl0608 2024-08-01 14:04:27 +08:00
parent f8a4c0fbe7
commit 2103e5a723
2 changed files with 33 additions and 21 deletions

View File

@ -56,6 +56,7 @@ type DealOneOrderReq struct {
type RefundOrderReq struct {
OrderId string `json:"order_id"`
Operator string `json:"operator"`
IgnorePayRefund bool `json:"ignore_pay_refund"`
}
type RefundOrderData struct {

View File

@ -2706,10 +2706,12 @@ func (v *Vas) refundMembership(ctx *gin.Context, order *dbstruct.Order, req *vas
}
// 退款
if !req.IgnorePayRefund {
err = v.payRefund(ctx, tx, order)
if err != nil {
return err
}
}
return nil
}
@ -2804,10 +2806,12 @@ func (v *Vas) refundCoins(ctx *gin.Context, order *dbstruct.Order, req *vasproto
}
// 退款
if !req.IgnorePayRefund {
err = v.payRefund(ctx, tx, order)
if err != nil {
return err
}
}
return nil
}
@ -2902,10 +2906,12 @@ func (v *Vas) refundMoneyContactWechat(ctx *gin.Context, order *dbstruct.Order,
}
// 退款
if !req.IgnorePayRefund {
err = v.payRefund(ctx, tx, order)
if err != nil {
return err
}
}
return nil
}
@ -3128,10 +3134,12 @@ func (v *Vas) refundZoneAdmission(ctx *gin.Context, order *dbstruct.Order, req *
}
// 退款
if !req.IgnorePayRefund {
err = v.payRefund(ctx, tx, order)
if err != nil {
return err
}
}
return nil
}
@ -3355,11 +3363,12 @@ func (v *Vas) refundZoneMoment(ctx *gin.Context, order *dbstruct.Order, req *vas
}
// 退款
if !req.IgnorePayRefund {
err = v.payRefund(ctx, tx, order)
if err != nil {
return err
}
}
// 减购买人数
_ = v.store.DecZoneMomentBuyerCnt(ctx, zid, momentId)
@ -3591,10 +3600,12 @@ func (v *Vas) refundZoneSuperfanship(ctx *gin.Context, order *dbstruct.Order, re
}
// 退款
if !req.IgnorePayRefund {
err = v.payRefund(ctx, tx, order)
if err != nil {
return err
}
}
return nil
}