From 7c7457db40bbf37311217457770c37b6709dd5e4 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 5 Dec 2019 12:14:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E9=80=80=E6=AC=BEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/jx/localjx/order.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/business/partner/purchase/jx/localjx/order.go b/business/partner/purchase/jx/localjx/order.go index d774d4cca..0b11abae3 100644 --- a/business/partner/purchase/jx/localjx/order.go +++ b/business/partner/purchase/jx/localjx/order.go @@ -514,9 +514,11 @@ func CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string) if orderPay.Status == model.PayStatusYes { refundID := utils.Int64ToStr(GenRefundID(order)) orderPayRefund, err2 := refundOrderByWX(ctx, orderPay, refundID) - if err = err2; err == nil { + if err2 == nil { dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName()) errList.AddErr(dao.CreateEntity(dao.GetDB(), orderPay)) + } else { + errList.AddErr(err2) } } else { orderPay.Status = model.PayStatusCanceled @@ -524,7 +526,9 @@ func CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string) errList.AddErr(err2) } } - errList.AddErr(changeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, reason)) + if errList.GetErrListAsOne() == nil { + errList.AddErr(changeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, reason)) + } err = errList.GetErrListAsOne() } } else {