- 高德API的KEY改为公司认证的KEY,可访问量更大
- 拉取门店信息时要获取坐标及区信息 - 饿百订单买家的坐标转换为高德坐标
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package ebai
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/autonavi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/ditu"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
@@ -24,8 +25,7 @@ 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 := 0
|
||||
// districtCode := api.AutonaviAPI.GetCoordinateDistrictCode(shopInfo.Longitude, shopInfo.Latitude)
|
||||
lng, lat, _ := api.AutonaviAPI.CoordinateConvert(shopInfo.Longitude/100000, shopInfo.Latitude/100000, autonavi.CoordSysBaidu)
|
||||
return &model.PageShop{
|
||||
Name: shopInfo.Name,
|
||||
VendorID: model.VendorIDEBAI,
|
||||
@@ -34,9 +34,9 @@ func (c *PurchaseHandler) GetStorePageInfo(ctx *jxcontext.Context, cityInfo, sto
|
||||
VendorStatus: utils.Int2Str(shopInfo.BusinessStatus),
|
||||
|
||||
Address: shopInfo.Address,
|
||||
Lng: shopInfo.Longitude / 100000,
|
||||
Lat: shopInfo.Latitude / 100000,
|
||||
DistrictCode: districtCode,
|
||||
Lng: lng,
|
||||
Lat: lat,
|
||||
DistrictCode: 0,
|
||||
|
||||
Tel1: shopInfo.Phone,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user