From 4a2eb6f75b11ccb95e67a6f1c3b7cdf5b2c14d0c Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 03 七月 2019 10:39:00 +0800
Subject: [PATCH] only filter current analyServer es data

---
 router/router.go |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/router/router.go b/router/router.go
index 184334d..103fa46 100644
--- a/router/router.go
+++ b/router/router.go
@@ -38,11 +38,21 @@
 	eventPushController := new(controllers.EventPushController)
 	pollConfigController := new(controllers.PollConfigController)
 	fileController := new(controllers.FileController)
+	sysMenuController :=new(controllers.SysMenuController)
 
 	urlPrefix := "/data/api-v" // wp 娣诲姞 璺緞 鍓嶇紑
-	userApi := r.Group(urlPrefix + "/user")
+	sysApi := r.Group(urlPrefix + "/sys")
 	{
-		userApi.POST("/login", userController.Login)
+		sysApi.POST("/login",userController.Login)
+		sysApi.POST("/logout",userController.Logout)
+	}
+	sysMenuApi := r.Group("/sysmenus")
+	{
+		sysMenuApi.GET("/me",sysMenuController.Me)
+	}
+	userApi := r.Group(urlPrefix + "/users")
+	{
+		userApi.GET("/current",userController.Current)
 	}
 
 	//鍖哄煙绠$悊
@@ -61,12 +71,12 @@
 		camera.PUT("/update", cameraController.CameraUpdate)
 		camera.DELETE("/del/:cid", cameraController.CameraDel)
 		camera.GET("/show/:cid", cameraController.CameraSel)
-		camera.GET("/queryCameraAndTaskInfo", cameraController.QueryCameraAndTaskInfo)
+		camera.GET("/updateSnapshotUrl/:cid",cameraController.UpdateSnapshotUrl)
 
 		camera.POST("/alltask", cameraTaskController.FindTasksByCameraIds)
 		camera.GET("/task/:cameraId", cameraTaskController.CameraTaskAll)
 
-		camera.GET("/delTask/:cameraId/:taskId", cameraController.CameraDelTask)
+		camera.DELETE("/delTask/:cameraId/:taskId", cameraController.CameraDelTask)
 		camera.POST("/saveTask", cameraController.CameraTaskSave)
 		camera.GET("/getRulesByCameraAndTask", cameraTaskArgsController.FindByCameraAndTask)
 		camera.GET("/getCamerasByRunType", cameraController.GetCamerasByRunType)
@@ -200,7 +210,6 @@
 	r.Static("static", "./static") // 闈欐�佹枃浠�
 	//澶栭儴璁块棶swagger.json
 	r.StaticFile("/swagger.json", "./docs/swagger.json")
-	fileController := new(controllers.FileController)
 	vdbperson.POST("/fileupload", fileController.Fileupload)
 	vdbperson.POST("/moreFileUpload", fileController.MoreFileUpload)
 	r.POST(urlPrefix+"/es/ImageUploadReturnPics", fileController.ImageUploadReturnPics)

--
Gitblit v1.8.0