From b4745532050adfce28fbbdfdfd36fa629c9a01e7 Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 29 May 2019 14:13:23 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=AF=B9=E4=BA=8E=E8=BE=BE=E8=BE=BE?= =?UTF-8?q?=EF=BC=8C=E7=89=B9=E6=AE=8A=E5=A4=84=E7=90=86=E6=98=86=E5=B1=B1?= =?UTF-8?q?=E5=B8=82=EF=BC=8C=E5=B8=B8=E7=86=9F=E5=B8=82=E5=92=8C=E5=A4=AA?= =?UTF-8?q?=E4=BB=93=E5=B8=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index b18f43e28..0ec4e3c24 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -64,6 +64,9 @@ var ( "苏州工业园区": "工业园区", "郫都区": "郫县", "管城回族区": "管城区", + "昆山市": "1", + "常熟市": "1", + "太仓市": "1", } ) @@ -951,7 +954,12 @@ func updateOrCreateDadaStore(storeDetail *dao.StoreDetail2) (err error) { return fmt.Errorf("门店的城市码有问题,请检查") } if dadaDistrictMap[storeDetail.DistrictName] != "" { - storeDetail.DistrictName = dadaDistrictMap[storeDetail.DistrictName] + if dadaDistrictMap[storeDetail.DistrictName] == "1" { // 区镇信息 + storeDetail.CityName = storeDetail.DistrictName + storeDetail.DistrictName, _ = api.AutonaviAPI.GetCoordinateTownInfo(jxutils.IntCoordinate2Standard(storeDetail.Lng), jxutils.IntCoordinate2Standard(storeDetail.Lat)) + } else { + storeDetail.DistrictName = dadaDistrictMap[storeDetail.DistrictName] + } } if globals.EnableStoreWrite { _, err = api.DadaAPI.ShopDetail(storeDetail.DadaStoreID)