diff --git a/app/services/OrderService.go b/app/services/OrderService.go index 251613e..852a6a7 100644 --- a/app/services/OrderService.go +++ b/app/services/OrderService.go @@ -216,8 +216,8 @@ func OrderNotify(request front.YouChuRequest) (NotifyResponse front.YouChuOrderN return front.YouChuOrderNotifyResponse{RespCode: "000003", RespMsg: "订单不存在"} } - _, err = ordersmodel.GetInstance().GetDb().Where("id = ?", order.Id).Update(ordersmodel.Orders{ExchangeTime: time.Now()}) - utils.Log(nil, "更新订单err", order.Id, err) + _, err = ordersmodel.GetInstance().GetDb().Where("id = ?", orderDetail.Id).Update(ordersmodel.Orders{ExchangeTime: time.Now()}) + utils.Log(nil, "更新订单err", orderDetail.Id, err) var productDetail productsmodel.Products has, err = productsmodel.GetInstance().GetDb().Where("id = ?", orderDetail.ProductId).Get(&productDetail) if err != nil || !has {