From 22ffecf95fe345de2b415e7cc41d2a00c7f8c948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 11 Mar 2020 16:27:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E8=AE=A2=E5=8D=95=E4=B8=80?= =?UTF-8?q?=E5=91=A8=E5=86=85=E4=B8=8D=E8=83=BD=E9=87=8D=E5=A4=8D=E4=B8=8B?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/orderman_ext.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index c830e25ea..eb13e0cad 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -1177,7 +1177,7 @@ func GetOrdersAccept(ctx *jxcontext.Context, storeID int) (result []*OrderSkusAc func GetMatterStoreOrderCount(ctx *jxcontext.Context, storeID int) (result *OrderCount, err error) { var ( db = dao.GetDB() - orderPay *model.OrderPay + orderPays []*model.OrderPay orderCount = &OrderCount{} ) sql2 := ` @@ -1207,8 +1207,9 @@ func GetMatterStoreOrderCount(ctx *jxcontext.Context, storeID int) (result *Orde LIMIT 1 ` sqlParams := []interface{}{storeID, model.OrderStatusDelivering, model.OrderStatusCanceled} - err = dao.GetRow(db, &orderPay, sql, sqlParams) - if orderPay != nil { + err = dao.GetRows(db, &orderPays, sql, sqlParams) + if len(orderPays) != 0 { + orderPay := orderPays[0] if time.Now().Sub(*orderPay.PayFinishedAt).Hours() < 24*7 { orderCount.Flag = false } else {