From 0cd14ccf7c07e8c6d1a5fad0a707b14b7bd6281e Mon Sep 17 00:00:00 2001 From: "qiyunfanbo126.com" <815699> Date: Tue, 22 Oct 2024 18:07:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=93=81=E7=89=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/OrderService.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/OrderService.go b/app/services/OrderService.go index d58c56e..3b27bc0 100644 --- a/app/services/OrderService.go +++ b/app/services/OrderService.go @@ -180,7 +180,7 @@ func OrderRefundService(userId int, orderId int) (code int) { order.RefundOrderNo = response.RefundOrderNo order.RefundOrderSta = response.RefundOrderSta order.RefundTime = time.Now() - _, err := ordersmodel.GetInstance().GetDb().Where("id = ?", order.Id).Update(order) + _, err := ordersmodel.GetInstance().GetDb().Where("id = ?", order.Id).Update(order.Orders) //增加库存 if err == nil { _, err = ordersmodel.GetInstance().GetDb().Exec("update products set stock=stock+1 where id = " + strconv.Itoa(order.ProductId))