From db08f1d96d9746f2416416b80a791f317ab384de Mon Sep 17 00:00:00 2001 From: "qiyunfanbo126.com" <815699> Date: Thu, 17 Oct 2024 23:18:40 +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/http/controllers/front/OrderController.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/http/controllers/front/OrderController.go b/app/http/controllers/front/OrderController.go index 0738bed..9f70620 100644 --- a/app/http/controllers/front/OrderController.go +++ b/app/http/controllers/front/OrderController.go @@ -53,16 +53,19 @@ func OrderQuery(c *gin.Context) { var OrderQueryResponse front.OrderQueryResponse has, err := services.OrderDetailService(&order) if err != nil { + utils.Log(nil, "err", err) controllers.Error(c, 500, "订单查询失败") return } if has { if order.State < common.ORDER_STATUS_PAY && order.VoucherLink == "" { _, rsp := services.YouChuOrderQuery(order.Orders) + utils.Log(nil, "三方订单查询", rsp) if rsp.OrderSta == "03" { err := services.OrdersUpdateService(front.OrdersUpdateRequest{Id: order.Id, Status: common.ORDER_STATUS_PAY, OrgTxnSeq: rsp.OrderNo}) if err != nil { + utils.Log(nil, "err", err) controllers.Error(c, 500, "订单更新失败") return } @@ -73,6 +76,7 @@ func OrderQuery(c *gin.Context) { OrderQueryResponse.MainImage = services.GetProductImage(order.ProductId) controllers.Success(c, OrderQueryResponse, "请求成功") } else { + utils.Log(nil, "err", err) controllers.HandCodeRes(c, nil, errorcode.NotFound) return }