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

@ -54,8 +54,9 @@ type DealOneOrderReq struct {
}
type RefundOrderReq struct {
OrderId string `json:"order_id"`
Operator string `json:"operator"`
OrderId string `json:"order_id"`
Operator string `json:"operator"`
IgnorePayRefund bool `json:"ignore_pay_refund"`
}
type RefundOrderData struct {

View File

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