From 397ff0ed8f549f741afa41d90a9c68c38005e463 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期日, 28 六月 2020 14:42:37 +0800
Subject: [PATCH] dbapi add log
---
controllers/cameraPolygon.go | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/controllers/cameraPolygon.go b/controllers/cameraPolygon.go
index 4739845..7117b62 100644
--- a/controllers/cameraPolygon.go
+++ b/controllers/cameraPolygon.go
@@ -2,10 +2,9 @@
import (
"basic.com/dbapi.git"
+ "github.com/gin-gonic/gin"
"webserver/extend/code"
"webserver/extend/util"
- "fmt"
- "github.com/gin-gonic/gin"
)
type CameraPolygonController struct {
@@ -14,6 +13,7 @@
type CameraPolygonVo struct {
CameraId string `json:"camera_id"` //鎽勫儚鏈篿d
+ SnapshotUrl string `json:"snapshot_url"` //蹇収鍦板潃
Line []PolygonS `json:"line"` //鐢荤殑鎵�鏈夌嚎
Rect []PolygonS `json:"rect"` //鐭╁舰
Arrow []PolygonS `json:"arrow"` //绠ご
@@ -33,6 +33,7 @@
Y float64 `json:"y"`
}
+// @Security ApiKeyAuth
// @Summary 淇濆瓨鎽勫儚鏈哄杈瑰舰
// @Description 淇濆瓨鎽勫儚鏈哄杈瑰舰
// @Accept json
@@ -45,7 +46,6 @@
func (controller CameraPolygonController) Save(c *gin.Context) {
paramBody := make(map[string]interface{},0)
c.BindJSON(¶mBody)
- fmt.Println(paramBody)
var api dbapi.CameraApi
flag, data := api.SaveCameraPolygon(paramBody)
if flag {
@@ -55,10 +55,9 @@
util.ResponseFormat(c,code.ComError,"淇濆瓨澶辫触")
}
-
+// @Security ApiKeyAuth
// @Summary 鍒犻櫎鎽勫儚鏈哄尯鍩�
// @Description 鍒犻櫎鎽勫儚鏈哄尯鍩�
-// @Accept json
// @Produce json
// @Tags 鎽勫儚鏈哄杈瑰舰
// @Param id query string true "id"
@@ -81,9 +80,9 @@
util.ResponseFormat(c,code.ComError,"鍒犻櫎")
}
+// @Security ApiKeyAuth
// @Summary 鏌ユ壘鎽勫儚鏈哄尯鍩�
// @Description 鏌ユ壘鎽勫儚鏈哄尯鍩�
-// @Accept json
// @Produce json
// @Tags 鎽勫儚鏈哄杈瑰舰
// @Param cameraId query string true "cameraId"
@@ -117,7 +116,7 @@
if flag {
util.ResponseFormat(c,code.Success,data)
} else {
- util.ResponseFormat(c,code.ComError,data)
+ util.ResponseFormat(c,code.ComError,"鏇存柊澶辫触")
}
}
--
Gitblit v1.8.0