From f9136f14c54c9c67f3571a543f3b15f22e28b218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 25 May 2020 10:56:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=96=B0=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/tempop/tempop.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index c140df40b..08ac2b5cd 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -1594,8 +1594,12 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { sqlParams := []interface{}{utils.DefaultTimeValue, utils.DefaultTimeValue} err = dao.GetRows(db, &stores, sql, sqlParams) result1, _ := api.JdShopAPI.GetProvince() + var flag = false for _, v := range stores { for _, vv := range result1 { + if vv.AreaID != 1 && vv.AreaID != 2 && vv.AreaID != 3 && vv.AreaID != 4 { + continue + } result2, _ := api.JdShopAPI.GetCity(vv.AreaID) for _, vvv := range result2 { result3, _ := api.JdShopAPI.GetCounty(vvv.AreaID) @@ -1603,10 +1607,20 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { if vvvv.AreaName == v.JdsStreetName { v.JdsStreetCode = vvvv.AreaID dao.UpdateEntity(db, v, "JdsStreetCode") + flag = true + break } + } + if flag { break } } + if flag { + break + } + } + if flag { + continue } } return err