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

View File

@@ -22,19 +22,21 @@ func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendo
// result, err := api.JdShopAPI.NewInfoList(utils.Str2Int64(vendorStoreID))
// storeDetail.VendorStoreID = vendorStoreID
// storeDetail.Status = JdsStatus2jxStatus(result.StoreStatus)
result2, err := api.JdShopAPI.QueryEntityStore(utils.Str2Int64(vendorStoreID))
if result2 == nil {
return storeDetail, fmt.Errorf("未查询到该平台门店平台门店ID[%v]", vendorStoreID)
if vendorStoreID != "" {
result2, _ := api.JdShopAPI.QueryEntityStore(utils.Str2Int64(vendorStoreID))
if result2 == nil {
return storeDetail, fmt.Errorf("未查询到该平台门店平台门店ID[%v]", vendorStoreID)
}
storeDetail = &dao.StoreDetail{}
storeDetail.ID = utils.Str2Int(result2.ExStoreID)
storeDetail.Name = result2.StoreName
storeDetail.Address = result2.Address
storeDetail.Tel1 = result2.Phone
storeDetail.DistrictCode = result2.AddrCode
zbs := strings.Split(result2.Coordinate, ",")
storeDetail.Lat = jxutils.StandardCoordinate2Int(utils.Str2Float64(zbs[0]))
storeDetail.Lng = jxutils.StandardCoordinate2Int(utils.Str2Float64(zbs[1]))
}
storeDetail = &dao.StoreDetail{}
storeDetail.ID = utils.Str2Int(result2.ExStoreID)
storeDetail.Name = result2.StoreName
storeDetail.Address = result2.Address
storeDetail.Tel1 = result2.Phone
storeDetail.DistrictCode = result2.AddrCode
zbs := strings.Split(result2.Coordinate, ",")
storeDetail.Lat = jxutils.StandardCoordinate2Int(utils.Str2Float64(zbs[0]))
storeDetail.Lng = jxutils.StandardCoordinate2Int(utils.Str2Float64(zbs[1]))
return storeDetail, err
}