This commit is contained in:
richboo111
2022-11-04 19:04:48 +08:00
parent 6b3c4574f0
commit d4bc09c9d9

View File

@@ -123,8 +123,8 @@ func CreateFenceByStore(appOrgCode string, storeID int64) (fenceID string, err e
Shape: tiktok_api.ShapeCircular,
Circular: &warehouse_createFence_request.Circular{
Center: &warehouse_createFence_request.Center{
Longitude: utils.Int2Float64(localStore.Lng),
Latitude: utils.Int2Float64(localStore.Lat),
Longitude: float64(localStore.Lng) / float64(1000000),
Latitude: float64(localStore.Lat) / float64(1000000),
},
Radius: utils.Str2Float64(localStore.DeliveryRange),
},
@@ -202,8 +202,8 @@ func UpdateFenceByStore(appOrgCode, outFenceID string, storeID int) error {
if localStore.DeliveryRangeType == tiktok_api.ShapeCircular {
circular := &warehouse_setFence_request.Circular{
Center: &warehouse_setFence_request.Center{
Longitude: utils.Int2Float64(localStore.Lng),
Latitude: utils.Int2Float64(localStore.Lat),
Longitude: float64(localStore.Lng) / float64(1000000),
Latitude: float64(localStore.Lat) / float64(1000000),
},
Radius: utils.Str2Float64(localStore.DeliveryRange),
}