This commit is contained in:
suyl
2021-08-31 18:15:57 +08:00
parent 7b4617ce90
commit 261391b3ca

View File

@@ -22,7 +22,8 @@ func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendo
// result, err := api.JdShopAPI.NewInfoList(utils.Str2Int64(vendorStoreID)) // result, err := api.JdShopAPI.NewInfoList(utils.Str2Int64(vendorStoreID))
// storeDetail.VendorStoreID = vendorStoreID // storeDetail.VendorStoreID = vendorStoreID
// storeDetail.Status = JdsStatus2jxStatus(result.StoreStatus) // storeDetail.Status = JdsStatus2jxStatus(result.StoreStatus)
result2, err := api.JdShopAPI.QueryEntityStore(utils.Str2Int64(vendorStoreID)) if vendorStoreID != "" {
result2, _ := api.JdShopAPI.QueryEntityStore(utils.Str2Int64(vendorStoreID))
if result2 == nil { if result2 == nil {
return storeDetail, fmt.Errorf("未查询到该平台门店平台门店ID[%v]", vendorStoreID) return storeDetail, fmt.Errorf("未查询到该平台门店平台门店ID[%v]", vendorStoreID)
} }
@@ -35,6 +36,7 @@ func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendo
zbs := strings.Split(result2.Coordinate, ",") zbs := strings.Split(result2.Coordinate, ",")
storeDetail.Lat = jxutils.StandardCoordinate2Int(utils.Str2Float64(zbs[0])) storeDetail.Lat = jxutils.StandardCoordinate2Int(utils.Str2Float64(zbs[0]))
storeDetail.Lng = jxutils.StandardCoordinate2Int(utils.Str2Float64(zbs[1])) storeDetail.Lng = jxutils.StandardCoordinate2Int(utils.Str2Float64(zbs[1]))
}
return storeDetail, err return storeDetail, err
} }