From c7ef385ba09ac3ec9bb83ac2385557ffad778d5d Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 27 Jul 2022 18:13:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=90=8E=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/q_bida/q_bida_server.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/business/q_bida/q_bida_server.go b/business/q_bida/q_bida_server.go index efe87c441..2f5334f70 100644 --- a/business/q_bida/q_bida_server.go +++ b/business/q_bida/q_bida_server.go @@ -254,12 +254,6 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd // 微信支付原路退款,发起退款申请 res, err := RefundOrderByTL(ctx, orderWay, order, order.OtherWayBill, int(order.ChannelFee*100), "申请退款") if len(res.VendorRefundID) > 0 { - if _, err := dao.SetUserVendorOrderStatus(db, tmp_orderNo, 150); err != nil { - return FailCode, err - } - if _, err := dao.SetOrderStatus(db, orderWay.OrderID, 150); err != nil { - return FailCode, err - } return SuccessCode, err } else { return FailCode, err @@ -453,6 +447,11 @@ func RefundOrderByTL(ctx *jxcontext.Context, orderPay *model.Order, order *model dao.Rollback(db, tx) return nil, err } + orderPay.Status = model.OrderStatusCancel + if _, err := dao.UpdateEntityTx(tx, orderPay); err != nil { + dao.Rollback(db, tx) + return nil, err + } dao.Commit(db, tx) }