- 不获取门店坐标信息(节约高德API配额)

This commit is contained in:
gazebo
2019-06-25 14:10:35 +08:00
parent 64e45962bf
commit a1aa4de06c
2 changed files with 6 additions and 2 deletions

View File

@@ -24,7 +24,8 @@ func (c *PurchaseHandler) GetStoreIDListByCoordinates(ctx *jxcontext.Context, co
func (c *PurchaseHandler) GetStorePageInfo(ctx *jxcontext.Context, cityInfo, storeID string) (storePageInfo *model.PageShop, err error) {
shopInfo, err2 := api.EbaiAPI.GetStoreInfo2(storeID)
if err = err2; err == nil && shopInfo != nil {
_, _, districtCode := api.AutonaviAPI.GetCoordinateFromAddress(shopInfo.Address, cityInfo)
districtCode := 0
// districtCode := api.AutonaviAPI.GetCoordinateDistrictCode(shopInfo.Longitude, shopInfo.Latitude)
return &model.PageShop{
Name: shopInfo.Name,
VendorID: model.VendorIDEBAI,

View File

@@ -26,7 +26,10 @@ func (c *PurchaseHandler) GetStoreIDListByCoordinates(ctx *jxcontext.Context, co
func (c *PurchaseHandler) GetStorePageInfo(ctx *jxcontext.Context, cityInfo, storeID string) (storePageInfo *model.PageShop, err error) {
shopInfo, err2 := api.JdAPI.GetStoreInfo2(storeID)
if err = err2; err == nil && shopInfo != nil {
lng, lat, districtCode := api.AutonaviAPI.GetCoordinateFromAddress(shopInfo.StoreInfo.StoreAddress, cityInfo)
var lng, lat float64
districtCode := 0
// 由于高德API免费有调用次数限制暂时不取坐标信息
// lng, lat, districtCode := api.AutonaviAPI.GetCoordinateFromAddress(shopInfo.StoreInfo.StoreAddress, cityInfo)
return &model.PageShop{
Name: shopInfo.StoreInfo.StoreName,
VendorID: model.VendorIDJD,