- 门店同步状态区分名称与配送相关的部分,分开同步
This commit is contained in:
@@ -359,31 +359,35 @@ func JxBusinessTime2Ebai(store *model.Store) interface{} {
|
||||
|
||||
func genStoreMapFromStore(store *tEbaiStoreInfo) map[string]interface{} {
|
||||
params := map[string]interface{}{
|
||||
// "name": jxutils.ComposeStoreName(store.Name, model.VendorIDEBAI),
|
||||
"phone": store.Tel1,
|
||||
"longitude": jxutils.IntCoordinate2Standard(store.Lng),
|
||||
"latitude": jxutils.IntCoordinate2Standard(store.Lat),
|
||||
"address": store.Address,
|
||||
"coord_type": ebaiapi.CoordTypeAutonavi, // 一直用高德
|
||||
"business_time": JxBusinessTime2Ebai(&store.Store),
|
||||
}
|
||||
if deliveryRegion := JxDeliveryRegion2Ebai(&store.Store); deliveryRegion != nil {
|
||||
params["delivery_region"] = deliveryRegion
|
||||
}
|
||||
if store.VendorStoreID != "" {
|
||||
params["baidu_shop_id"] = store.VendorStoreID
|
||||
}
|
||||
if store.Tel2 != "" {
|
||||
params["ivr_phone"] = store.Tel2
|
||||
}
|
||||
if store.ProvinceID != 0 {
|
||||
params["province"] = store.ProvinceID
|
||||
if store.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreName) != 0 {
|
||||
// params["name"] = jxutils.ComposeStoreName(store.Name, model.VendorIDEBAI)
|
||||
}
|
||||
if store.CityID != 0 {
|
||||
params["city"] = store.CityID
|
||||
}
|
||||
if store.DistrictID != 0 {
|
||||
params["county"] = store.DistrictID
|
||||
if store.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreAddress) != 0 {
|
||||
params["longitude"] = jxutils.IntCoordinate2Standard(store.Lng)
|
||||
params["latitude"] = jxutils.IntCoordinate2Standard(store.Lat)
|
||||
params["address"] = store.Address
|
||||
params["coord_type"] = ebaiapi.CoordTypeAutonavi
|
||||
if deliveryRegion := JxDeliveryRegion2Ebai(&store.Store); deliveryRegion != nil {
|
||||
params["delivery_region"] = deliveryRegion
|
||||
}
|
||||
if store.ProvinceID != 0 {
|
||||
params["province"] = store.ProvinceID
|
||||
}
|
||||
if store.CityID != 0 {
|
||||
params["city"] = store.CityID
|
||||
}
|
||||
if store.DistrictID != 0 {
|
||||
params["county"] = store.DistrictID
|
||||
}
|
||||
}
|
||||
return params
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user