ddscope
This commit is contained in:
@@ -93,14 +93,14 @@ func CreateFenceByStore(appOrgCode string, storeID int64) (fenceID string, err e
|
||||
var (
|
||||
db *dao.DaoDB
|
||||
localStore *LocalStore
|
||||
verticeses []warehouse_createFence_request.VerticesItem
|
||||
vertex []warehouse_createFence_request.VerticesItem
|
||||
)
|
||||
sqlParam := []interface{}{
|
||||
model.VendorIDDD,
|
||||
}
|
||||
sqlStr := ` SELECT t.lng,t.lat,t.delivery_range_type,t.delivery_range,s.vendor_store_id FROM store t
|
||||
LEFT JOIN store_map s ON t.id = s.store_id
|
||||
WHERE s.vendor_id= ? `
|
||||
WHERE s.vendor_id = ? `
|
||||
if storeID != 0 {
|
||||
sqlStr += " AND t.id = ? "
|
||||
sqlParam = append(sqlParam, storeID)
|
||||
@@ -131,9 +131,9 @@ func CreateFenceByStore(appOrgCode string, storeID int64) (fenceID string, err e
|
||||
Longitude: utils.Str2Float64(s2[0]),
|
||||
Latitude: utils.Str2Float64(s2[1]),
|
||||
}
|
||||
verticeses = append(verticeses, vertices)
|
||||
vertex = append(vertex, vertices)
|
||||
}
|
||||
param.FenceInfo.Polygon.Vertices = verticeses
|
||||
param.FenceInfo.Polygon.Vertices = vertex
|
||||
}
|
||||
resp, err := getAPI(appOrgCode, 0, "").CreateFence(param)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user