From 906c2c219c73b90eae9e5040d09d1b32b5d928d9 Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期四, 27 六月 2019 13:52:42 +0800 Subject: [PATCH] get facefea from faceExtract sdk --- controllers/camera.go | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/controllers/camera.go b/controllers/camera.go index d532222..9efc660 100644 --- a/controllers/camera.go +++ b/controllers/camera.go @@ -207,15 +207,15 @@ runTypeStr := c.Query("runType") cameraName := c.Query("cameraName") - fmt.Println("runType:",runTypeStr) - fmt.Println("cameraName:",cameraName) + fmt.Println("runType:", runTypeStr) + fmt.Println("cameraName:", cameraName) runType, err := strconv.Atoi(runTypeStr) if err !=nil || (runType !=0 && runType !=1) { util.ResponseFormat(c,code.RequestParamError,"鍙傛暟鏈夎") return } var api dbapi.CameraApi - b,list := api.GetCamerasByRunType(runType) + b, list := api.GetCamerasByRunType(runType, cameraName) if b { dataBytes, _ := json.Marshal(list) var cams []CameraVo @@ -243,8 +243,10 @@ util.ResponseFormat(c,code.RequestParamError,"鍙傛暟鏈夎") return } + var api dbapi.CameraApi b, data := api.UpdateRunEnable(cameraId, runEnable) + fmt.Println("data:",data) if b { util.ResponseFormat(c,code.Success,data) } else { -- Gitblit v1.8.0