增加品牌
This commit is contained in:
parent
7120d29130
commit
db08f1d96d
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue