From db8ca7470bee6b6e5a7b81e9b6f03ad727ce6d11 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 12 Sep 2019 18:13:42 +0800 Subject: [PATCH] - fk --- business/netspider/netspider.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/business/netspider/netspider.go b/business/netspider/netspider.go index 9994ca6aa..60f1648a2 100644 --- a/business/netspider/netspider.go +++ b/business/netspider/netspider.go @@ -149,7 +149,7 @@ func GetAndStoreCitiesShops(ctx *jxcontext.Context, vendorIDs []int, cityCodeLis ORDER BY t1.id DESC LIMIT 1` var lastShop *model.PageShop - if dao.GetRow(db, &lastShop, sql) == nil { + if err2 := dao.GetRow(db, &lastShop, sql); err2 == nil { index := -1 for k, v := range cityCodeList { if v == lastShop.CityCode { @@ -166,6 +166,9 @@ func GetAndStoreCitiesShops(ctx *jxcontext.Context, vendorIDs []int, cityCodeLis cityCodeList2 = append(cityCodeList2, cityCodeList[:index]...) cityCodeList = cityCodeList2 } + globals.SugarLogger.Debugf("GetAndStoreCitiesShops cityCodeList:%v", cityCodeList) + } else { + globals.SugarLogger.Debugf("GetAndStoreCitiesShops get lastest city code error:%v", err2) } } if len(vendorIDs) == 0 {