增加品牌

This commit is contained in:
qiyunfanbo126.com 2024-10-17 23:18:40 +08:00
parent 7120d29130
commit db08f1d96d
1 changed files with 4 additions and 0 deletions

View File

@ -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
}