panlei
2019-11-09 573a1e019fc00e171b7df7105fe69b414a490966
ruleserver/readyDataForRule.go
@@ -123,14 +123,14 @@
// 将字符串格式的坐标序列化为Point格式
func Json2points(areaPoints string) []Point {
   var pts []Point
func Json2points(areaPoints string) []structure.Point {
   var pts []structure.Point
   if areaPoints == "[]" || areaPoints == "" {
      logger.Error("=====================此区域为全部区域")
      pts = append(pts, Point{0, 0})
      pts = append(pts, Point{0, 540})
      pts = append(pts, Point{960, 540})
      pts = append(pts, Point{960, 0})
      pts = append(pts, structure.Point{0, 0})
      pts = append(pts, structure.Point{0, 540})
      pts = append(pts, structure.Point{960, 540})
      pts = append(pts, structure.Point{960, 0})
   } else {
      err := json.Unmarshal([]byte(areaPoints), &pts)
      if err != nil {