This commit is contained in:
richboo111
2022-11-08 10:36:54 +08:00
parent bc46e60a3c
commit f05592f5b9

View File

@@ -146,8 +146,12 @@ func CreateFenceByStore(appOrgCode string, storeID int64) (fenceID string, err e
tempStr := strings.Split(localStore.DeliveryRange, ";")
for v := len(tempStr) - 1; v >= 0; v-- {
s2 := strings.Split(tempStr[v], ",")
tLng, _ := strconv.ParseFloat(s2[0], 64)
tLat, _ := strconv.ParseFloat(s2[1], 64)
globals.SugarLogger.Debugf("len==%d\n,2[0]==%s\n,s2[1]==%s", len(s2), s2[0], s2[1])
tLng, err1 := strconv.ParseFloat(s2[0], 64)
tLat, err2 := strconv.ParseFloat(s2[1], 64)
if err1 != nil || err2 != nil {
globals.SugarLogger.Debugf("err1==%v,err2==%v", err1, err2)
}
vertices := warehouse_createFence_request.VerticesItem{
Longitude: tLng, //todo 不能这么转
Latitude: tLat,