From 0f61a15b971e21e3646f39771a81ced34f885503 Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 28 Jan 2019 10:47:24 +0800 Subject: [PATCH] - in RefreshMissingDadaStores, update dada shop when shop already exist. --- business/jxstore/cms/store.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index d0d5422fe..a8f1cf8c3 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -730,6 +730,19 @@ func RefreshMissingDadaStores(ctx *jxcontext.Context, isAsync, isContinueWhenErr storeDetail.DistrictName, storeDetail.Address, jxutils.IntCoordinate2Standard(storeDetail.Lng), jxutils.IntCoordinate2Standard(storeDetail.Lat), storeDetail.Tel1, storeDetail.Tel1, nil) } + } else { + params := map[string]interface{}{ + "station_name": storeDetail.Name, + "business": dadaapi.BusinessTypeConvStore, + "city_name": storeDetail.CityName, + "area_name": storeDetail.DistrictName, + "station_address": storeDetail.Address, + "lng": jxutils.IntCoordinate2Standard(storeDetail.Lng), + "lat": jxutils.IntCoordinate2Standard(storeDetail.Lat), + "contact_name": storeDetail.Tel1, + "phone": storeDetail.Tel1, + } + err = api.DadaAPI.ShopUpdate(utils.Int2Str(storeDetail.ID), params) } if err == nil { db := dao.GetDB()