- 调整lng,lat和shop_score的数据格式为numeric
This commit is contained in:
@@ -43,7 +43,7 @@ func (c *PurchaseHandler) GetStorePageInfo(ctx *jxcontext.Context, cityInfo, sto
|
||||
RecentOrderNum: shopInfo.RecentOrderNum,
|
||||
SkuCount: shopInfo.SkuCount,
|
||||
BusinessType: shopInfo.Category,
|
||||
ShopScore: float32(shopInfo.ShopScore),
|
||||
ShopScore: float64(shopInfo.ShopScore),
|
||||
}, nil
|
||||
}
|
||||
return nil, err
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package jd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/ditu"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
@@ -9,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func (c *PurchaseHandler) GetStoreIDListByCoordinates(ctx *jxcontext.Context, coord *ditu.Coordinate) (storeIDList []string, err error) {
|
||||
shopListInfo, err := api.JdAPI.GetStoreList(utils.Float64ToStr(coord.Lng), utils.Float64ToStr(coord.Lat))
|
||||
shopListInfo, err := api.JdAPI.GetStoreList(fmt.Sprintf("%.6f", coord.Lng), fmt.Sprintf("%.6f", coord.Lat))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -47,7 +49,7 @@ func (c *PurchaseHandler) GetStorePageInfo(ctx *jxcontext.Context, cityInfo, sto
|
||||
RecentOrderNum: int(utils.Str2Int64WithDefault(shopInfo.StoreInfo.MonthSaleNum, 0)),
|
||||
SkuCount: int(utils.Str2Int64WithDefault(shopInfo.StoreInfo.InSaleNum, 0)),
|
||||
BusinessType: shopInfo.StoreInfo.Industry,
|
||||
ShopScore: float32(shopInfo.StoreCommentVO.ScoreAvg),
|
||||
ShopScore: float64(shopInfo.StoreCommentVO.ScoreAvg),
|
||||
}, nil
|
||||
}
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user