fix err return

This commit is contained in:
lwl0608 2024-03-21 19:18:50 +08:00
parent 66f90c6b45
commit 27e50ded04
1 changed files with 6 additions and 0 deletions

View File

@ -2451,6 +2451,9 @@ func (v *Vas) UnlockMembership(ctx *gin.Context, mid int64, product *dbstruct.Pr
func (v *Vas) RefundOrder(ctx *gin.Context, req *vasproto.RefundOrderReq) error {
// 获取订单
order, err := v.store.GetOrderById(ctx, nil, req.OrderId)
if err == sql.ErrNoRows {
return errs.ErrVasOrderNotExists
}
if err != nil {
return err
}
@ -2962,6 +2965,9 @@ func (v *Vas) refundMoneyContactWechat(ctx *gin.Context, order *dbstruct.Order,
func (v *Vas) RefundCoinOrder(ctx *gin.Context, req *vasproto.RefundCoinOrderReq) error {
// 获取订单
order, err := v.store.GetCoinOrderById(ctx, nil, req.OrderId)
if err == sql.ErrNoRows {
return errs.ErrVasOrderNotExists
}
if err != nil {
return err
}