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 }