From 6be99b903a956a64b96d9e00dd5a67bf8c856a6d Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 9 Dec 2019 18:35:25 +0800 Subject: [PATCH] jd specialDistrictMap --- business/partner/purchase/jd/store.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/business/partner/purchase/jd/store.go b/business/partner/purchase/jd/store.go index b9c45423e..128d17240 100644 --- a/business/partner/purchase/jd/store.go +++ b/business/partner/purchase/jd/store.go @@ -38,6 +38,12 @@ type tJdStoreInfo struct { SyncStatus int } +var ( + specialDistrictMap = map[int]int{ + 13989: 310032, + } +) + func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID string) (*dao.StoreDetail, error) { a := getAPI(vendorOrgCode) result, err := a.GetStoreInfoByStationNo2(vendorStoreID) @@ -159,6 +165,11 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin storeParams.DeliveryRangeRadius = int(utils.Str2Int64WithDefault(store.DeliveryRange, 0)) } } + if specialDistrictMap[storeParams.County] != 0 { + storeParams.City = storeParams.County + storeParams.County = specialDistrictMap[storeParams.County] + } + modifyCloseStatus := false if store.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagDeletedMask|model.SyncFlagStoreStatus) != 0 { modifyCloseStatus = true