From 68fc51cb635fecf12cad58deab88c3b5e0afc0ad Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期四, 22 八月 2019 17:06:49 +0800 Subject: [PATCH] yunnan swagger doc --- controllers/cluster.go | 55 ------- controllers/user.go | 4 controllers/capture.go | 5 controllers/cameraTask.go | 60 -------- controllers/cameraTimerule.go | 30 --- controllers/cameraTaskArgs.go | 45 ------ controllers/dbtableperson.go | 13 + controllers/task.go | 20 ++ controllers/sdk.go | 10 + controllers/cameraPolygon.go | 27 --- controllers/fileController.go | 16 - controllers/syssetcont.go | 12 controllers/camera.go | 53 ------- controllers/pollConfig.go | 8 + controllers/eventPush.go | 12 + controllers/tasklist.go | 4 controllers/initForData.go | 5 controllers/sysMenu.go | 2 controllers/taglist.go | 2 19 files changed, 90 insertions(+), 293 deletions(-) diff --git a/controllers/camera.go b/controllers/camera.go index b800bb7..415fece 100644 --- a/controllers/camera.go +++ b/controllers/camera.go @@ -164,15 +164,6 @@ return json.Marshal(test) } -// @Summary 灏嗘憚鍍忔満鎸傚埌鎸囧畾鐨勭洰褰曟爲涓� -// @Description 灏嗘憚鍍忔満鎸傚埌鎸囧畾鐨勭洰褰曟爲涓� -// @Produce json -// @Tags camera -// @Param cameraId path string true "鎽勫儚鏈篿d" -// @Param areaId path string true "鐩綍鍖哄煙id" -// @Success 200 {string} json "{"code":200, success:true, msg:"璇锋眰澶勭悊鎴愬姛", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"閿欒淇℃伅鍐呭"}" -// @Router /data/api-v/camera/cameraAreaAdd [get] func (ac CameraController) CameraAreaAdd(c *gin.Context) { cameraId := c.Param("cameraId") areaId := c.Param("areaId") @@ -180,15 +171,6 @@ fmt.Println(areaId) } -// @Summary 鍒犻櫎鏌愪竴涓洰褰曟爲涓嬬殑鎸囧畾鎽勫儚鏈� -// @Description 鍒犻櫎鏌愪竴涓洰褰曟爲涓嬬殑鎸囧畾鎽勫儚鏈� -// @Produce json -// @Tags camera -// @Param cameraId path string true "鎽勫儚鏈篿d" -// @Param areaId path string true "鎸囧畾鐩綍鍖哄煙id" -// @Success 200 {string} json "{"code":200, success:true, msg:"璇锋眰澶勭悊鎴愬姛", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"閿欒淇℃伅鍐呭"}" -// @Router /data/api-v/camera/cameraAreaDel [get] func (ac CameraController) CameraAreaDel(c *gin.Context) { cameraId := c.Param("cameraId") areaId := c.Param("areaId") @@ -196,15 +178,7 @@ fmt.Println(areaId) } -// @Summary 鑾峰彇杩愯绫诲瀷鑾峰彇鎽勫儚鏈哄垪琛� -// @Description 鑾峰彇杩愯绫诲瀷鑾峰彇鎽勫儚鏈哄垪琛� -// @Produce json -// @Tags camera -// @Param runType query int true "0锛氭煡杞锛�1锛氭煡瀹炴椂" -// @Param cameraName query string false "鏌ヨ鏉′欢" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/camera/getCamerasByRunType [get] + func (cc CameraController) GetCamerasByRunType(c *gin.Context) { runTypeStr := c.Query("runType") @@ -228,15 +202,6 @@ } } -// @Summary 鍒囨崲鎽勫儚鏈鸿繍琛屽疄鏃舵垨杞鐨勫紑鍏� -// @Description 鍒囨崲鎽勫儚鏈鸿繍琛屽疄鏃舵垨杞鐨勫紑鍏� -// @Produce json -// @Tags camera -// @Param cameraId query string true "鎽勫儚鏈篿d" -// @Param runEnable query bool true "寮�鍚細true锛屽叧闂細false" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/camera/updateRunEnable [post] func (cc CameraController) UpdateRunEnable(c *gin.Context) { cameraId := c.PostForm("cameraId") enableStr := c.PostForm("runEnable") @@ -256,14 +221,6 @@ } } -// @Summary 鏇存柊搴曞浘 -// @Description 鍒锋柊搴曞浘 -// @Produce json -// @Tags camera -// @Param cid path string true "鎽勫儚鏈篿d" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:"杩斿洖鐨勬枃浠舵湇鍔″櫒鍦板潃"}" -// @Failure 500 {string} json "{"code":500, success:false msg:"",data:"閿欒淇℃伅鍐呭"}" -// @Router /data/api-v/camera/updateSnapshotUrl/{cid} [get] func(cc CameraController) UpdateSnapshotUrl(c *gin.Context){ cid := c.Param("cid") //filename, err := service.UpdateSnapshotUrl(cid) @@ -281,14 +238,6 @@ RunType int `json:"run_type"` } -// @Summary 鎽勫儚鏈鸿疆璇㈠拰瀹炴椂鐘舵�佸垏鎹� -// @Description 鎽勫儚鏈鸿疆璇㈠拰瀹炴椂鐘舵�佸垏鎹� -// @Produce json -// @Tags camera -// @Param changeRunBody body controllers.CameraChangeRunVo true "鍙傛暟缁撴瀯浣�,0锛氬疄鏃跺垏杞锛�1锛氳疆璇㈠垏瀹炴椂" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/camera/changeRunType [post] func (cc CameraController) ChangeRunType(c *gin.Context) { var ccrVo CameraChangeRunVo if err := c.BindJSON(&ccrVo); err != nil { diff --git a/controllers/cameraPolygon.go b/controllers/cameraPolygon.go index 4408523..24922e2 100644 --- a/controllers/cameraPolygon.go +++ b/controllers/cameraPolygon.go @@ -33,15 +33,6 @@ Y float64 `json:"y"` } -// @Summary 淇濆瓨鎽勫儚鏈哄杈瑰舰 -// @Description 淇濆瓨鎽勫儚鏈哄杈瑰舰 -// @Accept json -// @Produce json -// @Tags 鎽勫儚鏈哄杈瑰舰 -// @Param cameraPolygon body controllers.CameraPolygonVo true "鎽勫儚鏈哄尯鍩熺粨鏋勪綋锛屽繀濉�" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}" -// @Router /data/api-v/polygon/save [post] func (controller CameraPolygonController) Save(c *gin.Context) { paramBody := make(map[string]interface{},0) c.BindJSON(¶mBody) @@ -55,15 +46,6 @@ } -// @Summary 鍒犻櫎鎽勫儚鏈哄尯鍩� -// @Description 鍒犻櫎鎽勫儚鏈哄尯鍩� -// @Accept json -// @Produce json -// @Tags 鎽勫儚鏈哄杈瑰舰 -// @Param id query string true "id" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/polygon/delete [get] func (controller CameraPolygonController) Delete(c *gin.Context) { id := c.Query("id") if id == "" { @@ -80,15 +62,6 @@ util.ResponseFormat(c,code.ComError,"鍒犻櫎") } -// @Summary 鏌ユ壘鎽勫儚鏈哄尯鍩� -// @Description 鏌ユ壘鎽勫儚鏈哄尯鍩� -// @Accept json -// @Produce json -// @Tags 鎽勫儚鏈哄杈瑰舰 -// @Param cameraId query string true "cameraId" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/polygon/findByCameraId [get] func (controller CameraPolygonController) FindByCameraId(c *gin.Context) { cameraId := c.Query("cameraId") if cameraId == "" { diff --git a/controllers/cameraTask.go b/controllers/cameraTask.go index 0e3b139..7f6dca2 100644 --- a/controllers/cameraTask.go +++ b/controllers/cameraTask.go @@ -74,15 +74,6 @@ Polygon CameraPolygonVo `json:"polygon"` } -// @Summary 鏌ヨ鎵�鏈変换鍔� -// @Description "鏌ヨ鎵�鏈変换鍔�" -// @Accept json -// @Produce json -// @Tags CameraTask -// @Param cameraIds body controllers.MultiCamera false "鎽勫儚鏈篿d鏁扮粍" -// @Success 200 {string} json "{"code":200, success:true, msg:"璇锋眰澶勭悊鎴愬姛", data:"鎵�鏈変换鍔′俊鎭�"}" -// @Failure 500 {string} json "{"code":500, success:false msg:"",data:"閿欒淇℃伅鍐呭"}" -// @Router /data/api-v/camera/alltask [post] func (controller CameraTaskController) FindTasksByCameraIds(c *gin.Context){ var mulCamera MultiCamera c.BindJSON(&mulCamera) @@ -95,14 +86,6 @@ } } -// @Summary 鏌ヨ鎵�鏈変换鍔� -// @Description "鏌ヨ鎵�鏈変换鍔�" -// @Produce json -// @Tags CameraTask -// @Param cameraId path string true "鎽勫儚鏈篿d" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}" -// @Router /data/api-v/camera/task/{cameraId} [get] func (controller CameraTaskController) CameraTaskAll(c *gin.Context) { cameraId := c.Param("cameraId") if cameraId == "" { @@ -119,15 +102,6 @@ } -// @Summary 鎽勫儚鏈轰繚瀛樹换鍔� -// @Description 鎽勫儚鏈轰繚瀛樹换鍔� -// @Accept json -// @Produce json -// @Tags camera -// @Param args body controllers.CameraTaskSaveArg true "鎽勫儚鏈轰换鍔′繚瀛樿姹傚弬鏁�" -// @Success 200 {string} json "{"code":200, success:true, msg:"璇锋眰澶勭悊鎴愬姛", data:"娣诲姞鐨勪换鍔′俊鎭�"}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"閿欒淇℃伅鍐呭"}" -// @Router /data/api-v/camera/saveTask [post] func (ac CameraController) CameraTaskSave(c *gin.Context) { var saveBody CameraTaskSaveArg err := c.BindJSON(&saveBody) @@ -147,15 +121,6 @@ } } -// @Summary 鍒犻櫎鎽勫儚鏈虹殑浠诲姟 -// @Description 鍒犻櫎鎽勫儚鏈虹殑浠诲姟 -// @Produce json -// @Tags camera -// @Param cameraId path string true "鎽勫儚鏈篿d" -// @Param taskId path string true "浠诲姟id" -// @Success 200 {string} json "{"code":200, success:true, msg:"璇锋眰澶勭悊鎴愬姛", data:"鍒犻櫎鐨勬憚鍍忔満淇℃伅"}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"閿欒淇℃伅鍐呭"}" -// @Router /data/api-v/camera/delTask/{cameraId}/{taskId} [delete] func (ac CameraController) CameraDelTask(c *gin.Context) { cameraId := c.Param("cameraId") taskId := c.Param("taskId") @@ -183,15 +148,6 @@ AlarmLevel int `json:"alarm_level"` } -// @Summary 淇濆瓨浠诲姟鏄惁涓嬩紶鏁版嵁 -// @Description 淇濆瓨浠诲姟鏄惁涓嬩紶鏁版嵁 -// @Accept json -// @Produce json -// @Tags CameraTask -// @Param TransAndAlarmLevel body controllers.DataTransVo true "璇锋眰鍙傛暟缁撴瀯" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}" -// @Router /data/api-v/cameraTask/saveIsDataTrans [post] func (controller CameraTaskController) SaveIsDataTrans(c *gin.Context) { var transVo DataTransVo if err := c.BindJSON(&transVo);err!=nil { @@ -209,14 +165,6 @@ } } -// @Summary 淇濆瓨瑙勫垯缁勬姤璀︾瓑绾� -// @Description 淇濆瓨瑙勫垯缁勬姤璀︾瓑绾� -// @Produce json -// @Tags CameraTask -// @Param GroupLevel body controllers.GroupAlarmLevelVo true "alarmLevel" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}" -// @Router /data/api-v/cameraTask/saveAlarmLevelByGroup [post] func (controller CameraTaskController) SaveAlarmLevelByGroup(c *gin.Context) { var groupLevelVo GroupAlarmLevelVo if err := c.BindJSON(&groupLevelVo);err !=nil { @@ -239,14 +187,6 @@ Status int `json:"status"` } -// @Summary 鏇存柊浠诲姟鐘舵�� -// @Description 鏇存柊浠诲姟鐘舵�� -// @Produce json -// @Tags CameraTask -// @Param CameraTaskStatus body controllers.CameraTaskStatusVo true "鍙傛暟缁撴瀯浣�" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}" -// @Router /data/api-v/cameraTask/updateCameraTaskStatus [post] func (controller CameraTaskController) UpdateCameraTaskStatus(c *gin.Context) { var paramVo CameraTaskStatusVo if err := c.BindJSON(¶mVo);err !=nil { diff --git a/controllers/cameraTaskArgs.go b/controllers/cameraTaskArgs.go index bdf36d8..c8ec3b3 100644 --- a/controllers/cameraTaskArgs.go +++ b/controllers/cameraTaskArgs.go @@ -14,16 +14,6 @@ } -// @Summary 鏍规嵁鎽勫儚鏈篿d鍜屼换鍔d鏌ヨ绠楁硶閰嶇疆璇︽儏 -// @Description 鏍规嵁鎽勫儚鏈篿d鍜屼换鍔d鏌ヨ绠楁硶閰嶇疆璇︽儏 -// @Produce json -// @Tags CameraTaskArgs -// @Param cameraId query string true "鎽勫儚鏈篿d" -// @Param taskId query string true "浠诲姟id" -// @Param set_type query string true "浠诲姟绫诲瀷" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"閿欒淇℃伅鍐呭"}" -// @Router /data/api-v/camera/getRulesByCameraAndTask [get] func (controller CameraTaskArgsController) FindByCameraAndTask(c *gin.Context) { cameraId := c.Query("cameraId") taskId := c.Query("taskId") @@ -42,15 +32,6 @@ } } -// @Summary 鏍规嵁澶氫釜鎽勫儚鏈篿d鏌ヨ鑱斿姩浠诲姟瑙勫垯璁剧疆 -// @Description 鏍规嵁澶氫釜鎽勫儚鏈篿d鏌ヨ鑱斿姩浠诲姟瑙勫垯璁剧疆 -// @Accept json -// @Produce json -// @Tags CameraTaskArgs -// @Param cameraIds body controllers.MultiCamera true "鎽勫儚鏈篿ds" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/cameraTaskArgs/getLinkRulesByCameraIds [post] func (controller CameraTaskArgsController) GetLinkRulesByCameraIds(c *gin.Context) { var cameraIdsVo MultiCamera if err := c.BindJSON(&cameraIdsVo);err !=nil { @@ -67,15 +48,6 @@ } } -// @Summary 鏍规嵁鍒嗙粍id鍒囨崲甯冮槻鎴栨挙闃� -// @Description 鏍规嵁鍒嗙粍id鍒囨崲甯冮槻鎴栨挙闃� -// @Produce json -// @Tags CameraTaskArgs -// @Param groupId query string true "浠诲姟绠楁硶鍙傛暟鍒嗙粍id" -// @Param defenceState query bool true "甯冮槻鐘舵��,false:鎾ら槻锛宼rue锛氬竷闃�" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/cameraTaskArgs/updateDefenceStateByGroup [post] func (controller CameraTaskArgsController) UpdateDefenceStateByGroup(c *gin.Context){ groupId := c.PostForm("groupId") str := c.PostForm("defenceState") @@ -93,14 +65,6 @@ } } -// @SUmmary 鏍规嵁鍒嗙粍id鍒犻櫎鎽勫儚鏈虹畻娉曡鍒� -// @Description 鏍规嵁鍒嗙粍id鍒犻櫎鎽勫儚鏈虹畻娉曡鍒� -// @Produce json -// @Tags CameraTaskArgs -// @Param groupId query string true "浠诲姟绠楁硶鍙傛暟鍒嗙粍id" -// @Success 200 {string} json "{"code":200, success:true, msg:"璇锋眰澶勭悊鎴愬姛", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"閿欒淇℃伅鍐呭"}" -// @Router /data/api-v/cameraTaskArgs/deleteByGroup [get] func (controller CameraTaskArgsController)DeleteByGroup(c *gin.Context) { groupId := c.Query("groupId") if groupId == "" { @@ -144,14 +108,7 @@ GroupId string `json:"group_id"`//鍒嗙粍id } -// @Summary 淇濆瓨鑱斿姩浠诲姟瑙勫垯鍙傛暟 -// @Description 淇濆瓨鑱斿姩浠诲姟瑙勫垯鍙傛暟 -// @Accept json -// @Produce json -// @Param saveBody body controllers.SaveLinkRulesGroupVo true "鑱斿姩浠诲姟瑙勫垯淇濆瓨鍙傛暟" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/cameraTaskArgs/saveLinkRulesByGroup [post] + func (controller CameraTaskArgsController) SaveLinkRulesByGroup(c *gin.Context) { var saveBody SaveLinkRulesGroupVo if err := c.BindJSON(&saveBody);err !=nil { diff --git a/controllers/cameraTimerule.go b/controllers/cameraTimerule.go index a4a249e..33b9883 100644 --- a/controllers/cameraTimerule.go +++ b/controllers/cameraTimerule.go @@ -29,16 +29,7 @@ Start string `json:"start"`//寮�濮� End string `json:"end"`//缁撴潫 } -// -// @Summary 鏃堕棿瑙勫垯淇濆瓨 -// @Description 鏃堕棿瑙勫垯淇濆瓨 -// @Accept json -// @Produce json -// @Tags CameraTimerule -// @Param cameraTimerule body controllers.CameraTimeruleVo true "鎽勫儚鏈轰换鍔℃椂闂磋鍒�" -// @Success 200 {string} json "{"code":200, success:true, msg:"璇锋眰澶勭悊鎴愬姛", data:"鎴愬姛淇℃伅"}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"閿欒淇℃伅鍐呭"}" -// @Router /data/api-v/cameraTimerule/save [post] + func (controller CameraTimeruleController) Save(c *gin.Context) { var vo CameraTimeruleVo err := c.BindJSON(&vo) @@ -62,15 +53,7 @@ util.ResponseFormat(c,code.ComError,"淇濆瓨澶辫触") } -// @Summary 鍒犻櫎鏃堕棿瑙勫垯 -// @Description 鍒犻櫎鏃堕棿瑙勫垯 -// @Accept json -// @Produce json -// @Tags CameraTimerule -// @Param id query string true "id" -// @Success 200 {string} json "{"code":200, success:true, msg:"璇锋眰澶勭悊鎴愬姛", data:"鎴愬姛淇℃伅"}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"閿欒淇℃伅鍐呭"}" -// @Router /data/api-v/cameraTimerule/delete [get] + func (controller CameraTimeruleController) Delete(c *gin.Context) { id := c.Query("id") if id == "" { @@ -85,14 +68,7 @@ util.ResponseFormat(c, code.ComError, "鍒犻櫎澶辫触") } -// @Summary 鏌ユ壘鎵�鏈夋椂闂磋鍒� -// @Description 鏌ユ壘鎵�鏈夋椂闂磋鍒� -// @Accept json -// @Produce json -// @Tags CameraTimerule -// @Success 200 {string} json "{"code":200, success:true, msg:"璇锋眰澶勭悊鎴愬姛", data:"鎴愬姛淇℃伅"}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"閿欒淇℃伅鍐呭"}" -// @Router /data/api-v/cameraTimerule/findAll [get] + func (controller CameraTimeruleController) FindAll(c *gin.Context) { var api dbapi.CameraApi result, data := api.FindAllTimeRules() diff --git a/controllers/capture.go b/controllers/capture.go index 68dcf52..441588b 100644 --- a/controllers/capture.go +++ b/controllers/capture.go @@ -19,10 +19,9 @@ // @Produce json // @Tags realTime // @Param obj body map true "搴曞簱鏁版嵁" -// @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true}" -// @Failure 500 {string} json "{"code":500, msg:"杩斿洖閿欒淇℃伅", success:false}" +// @Success 200 {string} json "{"code":200, msg:"", success:true}" +// @Failure 500 {string} json "{"code":500, msg:"", success:false}" // @Router /data/api-v/realTime/capture [POST] -//瀹炴椂鎶撴媿 func (rc *RealTimeController) PostCapture(c *gin.Context) { searchBody := make(map[string]interface{}, 0) diff --git a/controllers/cluster.go b/controllers/cluster.go index 3344bb9..873901e 100644 --- a/controllers/cluster.go +++ b/controllers/cluster.go @@ -53,15 +53,7 @@ NodeIps []string `json:"nodeIps"` } -// @Summary 鍒涘缓闆嗙兢 -// @Description 鍒涘缓闆嗙兢 -// @Accept json -// @Produce json -// @Tags cluster -// @Param clusterArg body controllers.ClusterCreateVo true "闆嗙兢鍒涘缓鍙傛暟" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/cluster/create [post] + func (cc ClusterController) Create(c *gin.Context) { var clusterVo ClusterCreateVo err := c.BindJSON(&clusterVo) @@ -78,27 +70,13 @@ } } -// @Summary 鐢熸垚闆嗙兢6浣嶉殢鏈哄瘑鐮� -// @Description 鐢熸垚闆嗙兢6浣嶉殢鏈哄瘑鐮� -// @Produce json -// @Tags cluster -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/cluster/randomPwd [get] + func (cc ClusterController) RandomPwd(c *gin.Context) { pwd := fmt.Sprintf("%06v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(1000000)) util.ResponseFormat(c,code.Success,pwd) } -// @Summary 鎼滅储闆嗙兢 -// @Description 鎼滅储闆嗙兢 -// @Accept json -// @Produce json -// @Tags cluster -// @Param searchArg body controllers.ClusterSearchVo true "闆嗙兢鎼滅储鍙傛暟" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/cluster/search [post] + func (cc ClusterController) Search(c *gin.Context) { var csv ClusterSearchVo err := c.BindJSON(&csv) @@ -115,14 +93,7 @@ } } -// @Summary 閫氳繃searchNum寮傛鑾峰彇闆嗙兢鑺傜偣淇℃伅 -// @Description 閫氳繃searchNum寮傛鑾峰彇闆嗙兢鑺傜偣淇℃伅 -// @Accept json -// @Produce json -// @Tags cluster -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/cluster/getNodesByNum [get] + func (cc ClusterController) GetSearchNodes(c *gin.Context) { var api dbapi.ClusterApi b, d := api.GetSearchNodes() @@ -133,14 +104,7 @@ } } -// @Summary 閫氳繃searchNum鍋滄鎼滅储 -// @Description 閫氳繃searchNum鍋滄鎼滅储 -// @Produce json -// @Tags cluster -// @Param searchNum query string true "鎼滅储缂栧彿" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/cluster/stopSearching [post] + func (cc ClusterController) StopSearching(c *gin.Context) { searchNum := c.Query("searchNum") if searchNum == "" { @@ -157,15 +121,6 @@ } -// @Summary 鍔犲叆闆嗙兢 -// @Description 鍔犲叆闆嗙兢 -// @Accept json -// @Produce json -// @Tags cluster -// @Param clusterArg body controllers.ClusterCreateVo true "闆嗙兢鍒涘缓鍙傛暟" -// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" -// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" -// @Router /data/api-v/cluster/joinCluster [post] func (cc ClusterController) JoinCluster(c *gin.Context) { var arg ClusterJoinVo err := c.BindJSON(&arg) diff --git a/controllers/dbtableperson.go b/controllers/dbtableperson.go index 9afabe9..6f4278d 100644 --- a/controllers/dbtableperson.go +++ b/controllers/dbtableperson.go @@ -148,7 +148,6 @@ // @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true}" // @Failure 500 {string} json "{"code":500, msg:"杩斿洖閿欒淇℃伅", success:false}" // @Router /data/api-v/dbperson/deleteDbPersonById/{uuid} [POST] - func (dbc DbPersonController) DeleteDbPerson(c *gin.Context) { id := c.Params.ByName("uuid") if id == "" { @@ -164,12 +163,14 @@ } } -// @Summary 鍒犻櫎搴曞簱浜哄憳 -// @Description 鍒犻櫎搴撲汉鍛� +type multiIds []string + +// @Summary 鎵归噺鍒犻櫎搴曞簱浜哄憳 +// @Description 鎵归噺鍒犻櫎搴撲汉鍛� // @Accept json // @Produce json // @Tags dbperson 搴曞簱浜哄憳 -// @Param uuids body []string true "搴曞簱浜哄憳ids " +// @Param uuids body controllers.multiIds true "搴曞簱浜哄憳ids" // @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true}" // @Failure 500 {string} json "{"code":500, msg:"杩斿洖閿欒淇℃伅", success:false}" // @Router /data/api-v/dbperson/deleteMoreDbPerson [POST] @@ -195,7 +196,7 @@ // @Accept json // @Produce json // @Tags dbperson 搴曞簱浜哄憳 -// @Param reqMap body map false "{"tableId":"","orderName":"uuid","orderType":"desc","contentValue":"","page":1,"size":8}" +// @Param reqMap body map false "{"tableId":"","orderName":"id","orderType":"desc","contentValue":"","page":1,"size":8}" // @Success 200 {string} json "{"code":200, "msg":"鐩綍缁撴瀯鏁版嵁", "success":true,"data":{}}" // @Failure 500 {string} json "{code:500, msg:"杩斿洖閿欒淇℃伅", success:false,data:{}}" // @Router /data/api-v/dbperson/queryDbPersonsByTbId [POST] @@ -262,7 +263,7 @@ // @Accept json // @Produce json // @Tags dbperson 搴曞簱浜哄憳 -// @Param reqMap body map false "{"tableId":"","orderName":"uuid","orderType":"desc","contentValue":"","page":1,"size":8}" +// @Param reqMap body map false "{"tableId":"","orderName":"id","orderType":"desc","contentValue":"","page":1,"size":8}" // @Success 200 {string} json "{"code":200, "msg":"鐩綍缁撴瀯鏁版嵁", "success":true,"data":{}}" // @Failure 500 {string} json "{code:500, msg:"杩斿洖閿欒淇℃伅", success:false,data:{}}" // @Router /data/api-v/dbperson/queryDbPersonsByCampare [POST] diff --git a/controllers/eventPush.go b/controllers/eventPush.go index 18f8a49..551912c 100644 --- a/controllers/eventPush.go +++ b/controllers/eventPush.go @@ -47,6 +47,7 @@ Enable bool `json:"enable"` } +/* // @Summary 浜嬩欢鎺ㄩ�佷繚瀛� // @Description 浜嬩欢鎺ㄩ�佷繚瀛� // @Tags 浜嬩欢鎺ㄩ�� @@ -54,6 +55,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/eventPush/save [post] +*/ func (epc EventPushController) Save(c *gin.Context) { var saveBody EventPushVo if err := c.BindJSON(&saveBody); err != nil { @@ -70,6 +72,7 @@ } } +/* // @Summary 鏍规嵁浜嬩欢鎺ㄩ�佷富棰樼殑涓�绾у拰浜岀骇閫夐」鑾峰彇鏈�鍚庝笅鎷夎彍鍗曞垪琛� // @Description 鏍规嵁浜嬩欢鎺ㄩ�佷富棰樼殑涓�绾у拰浜岀骇閫夐」鑾峰彇鏈�鍚庝笅鎷夎彍鍗曞垪琛� // @Produce json @@ -79,6 +82,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/eventPush/findByEventTopic [get] +*/ func (epc EventPushController) FindByEventTopic(c *gin.Context) { topic := c.Query("topic") childType := c.Query("type") @@ -95,6 +99,7 @@ } } +/* // @Summary 鏌ュ叏閮� // @Description 鏌ュ叏閮� // @Produce json @@ -103,6 +108,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/eventPush/findAll [get] +*/ func (controller EventPushController) FindAll(c *gin.Context) { name := c.Query("name") var api dbapi.EventPushApi @@ -114,6 +120,7 @@ } } +/* // @Summary 浜嬩欢鎺ㄩ�佺紪杈� // @Description 浜嬩欢鎺ㄩ�佺紪杈� // @Produce json @@ -122,6 +129,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/eventPush/getById [get] +*/ func (controller EventPushController) GetById(c *gin.Context) { id := c.Query("id") if id == "" { @@ -142,6 +150,7 @@ Enable bool `json:"enable"` } +/* // @Summary 鏀瑰彉enable鐘舵�� // @Description 鏀瑰彉enable鐘舵�� // @Produce json @@ -150,6 +159,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/eventPush/changeStatus [post] +*/ func (controller EventPushController) ChangeStatus(c *gin.Context) { var statusBody ChangeStatusVo err := c.BindJSON(&statusBody) @@ -166,6 +176,7 @@ } } +/* // @Summary 鏍规嵁id鍒犻櫎 // @Description 鏍规嵁id鍒犻櫎 // @Accept x-www-form-urlencoded @@ -175,6 +186,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/eventPush/delete [post] +*/ func (controller EventPushController) Delete(c *gin.Context) { id := c.PostForm("id") if id == "" { diff --git a/controllers/fileController.go b/controllers/fileController.go index a4c67ae..696584d 100644 --- a/controllers/fileController.go +++ b/controllers/fileController.go @@ -46,8 +46,8 @@ //var weedfsUri = "http://192.168.1.182:9500/submit" -// @Summary 渚濇嵁鍥剧墖娣诲姞搴曞簱浜哄憳 -// @Description 渚濇嵁鍥剧墖娣诲姞搴曞簱杩斿洖鏁版嵁浜哄憳 +// @Summary 鍗曞紶鍥剧墖涓婁紶锛屾坊鍔犲簳搴撲汉鍛� +// @Description 鍗曞紶鍥剧墖涓婁紶锛屾坊鍔犲簳搴撹繑鍥炴暟鎹汉鍛� // @Accept mpfd // @Produce json // @Tags dbperson 搴曞簱浜哄憳 @@ -523,8 +523,6 @@ } -// @Description 浜哄憳鐓х墖涓婁紶骞惰幏鍙栫壒寰佸�� -// @Router /data/api-v/dbperson/fileUploadTest [POST] func (controller FileController) UploadPersonTest(c *gin.Context) { file, _, err := c.Request.FormFile("file") //image杩欎釜鏄痷plaodify鍙傛暟瀹氫箟涓殑 'fileObjName':'image' if err != nil { @@ -629,8 +627,8 @@ // @Tags dbperson 搴曞簱浜哄憳 // @Param files formData file[] true "澶氫釜搴曞簱浜哄憳鍥剧墖" // @Param tableId formData string false "搴曞簱id,鏈塱d 鍒欏姞鍏ュ簳搴擄紝鏃犲垯鍙笂浼犲浘鐗�" -// @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true,data:{}}" -// @Failure 500 {string} json "{"code":500, msg:"杩斿洖閿欒淇℃伅", success:false,data:null}" +// @Success 200 {string} json "{"code":200, msg:"", success:true,data:{}}" +// @Failure 500 {string} json "{"code":500, msg:"", success:false,data:null}" // @Router /data/api-v/dbperson/moreFileUpload [POST] func (fc FileController) MoreFileUpload(c *gin.Context) { //寰楀埌涓婁紶鐨勬枃浠� @@ -769,10 +767,4 @@ //} // linux result["smImage"] = smUrl util.ResponseFormat(c, code.Success, result) -} - -/**涓嬭浇鏂规硶**/ -func Filedown(c *gin.Context) { - //鏆傛椂娌℃湁鎻愪緵鏂规硶 - } diff --git a/controllers/initForData.go b/controllers/initForData.go index 8999776..af18dd4 100644 --- a/controllers/initForData.go +++ b/controllers/initForData.go @@ -19,10 +19,9 @@ // @Accept json // @Produce json // @Tags realTime -// @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true}" -// @Failure 500 {string} json "{"code":500, msg:"杩斿洖閿欒淇℃伅", success:false}" +// @Success 200 {string} json "{"code":200, msg:"", success:true}" +// @Failure 500 {string} json "{"code":500, msg:"", success:false}" // @Router /data/api-v/realTime/initForCaptureData [POST] -//瀹炴椂鎶撴媿鏁版嵁鍒濆鍖� func (rc *RealTimeController) InitForCaptureData(c *gin.Context) { searchBody := make(map[string]interface{}, 0) c.BindJSON(&searchBody) diff --git a/controllers/pollConfig.go b/controllers/pollConfig.go index 014a071..b5ad9b1 100644 --- a/controllers/pollConfig.go +++ b/controllers/pollConfig.go @@ -18,6 +18,7 @@ Enable bool `json:"enable"` //鏄惁鍚敤杞 } +/* // @Summary 淇濆瓨杞鍛ㄦ湡 // @Description 淇濆瓨杞鍛ㄦ湡 // @Produce json @@ -26,6 +27,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/pollConfig/savePollPeriod [post] +*/ func (controller PollConfigController) SavePollPeriod(c *gin.Context) { periodStr := c.PostForm("period") period, err := strconv.Atoi(periodStr) @@ -42,6 +44,7 @@ } } +/* // @Summary 淇濆瓨杞寤舵椂 // @Description 淇濆瓨杞寤舵椂 // @Produce json @@ -50,6 +53,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/pollConfig/savePollDelay [post] +*/ func (controller PollConfigController) SavePollDelay(c *gin.Context) { delayStr := c.PostForm("delay") delay, err := strconv.Atoi(delayStr) @@ -66,6 +70,7 @@ } } +/* // @Summary 鑾峰彇鏈満杞閰嶇疆 // @Description 鑾峰彇鏈満杞閰嶇疆 // @Produce json @@ -73,6 +78,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/pollConfig/getPollConfig [get] +*/ func (controller PollConfigController) GetPollConfig(c *gin.Context) { var api dbapi.SysSetApi b, data := api.GetPollConfig() @@ -87,6 +93,7 @@ Enable bool `json:"enable"` } +/* // @Summary 鍒囨崲杞寮�鍏� // @Description 鍒囨崲杞寮�鍏� // @Produce json @@ -95,6 +102,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/pollConfig/updateEnable [post] +*/ func (controller PollConfigController) UpdateEnable(c *gin.Context) { var argBody PollEnableVo if err := c.BindJSON(&argBody); err != nil { diff --git a/controllers/sdk.go b/controllers/sdk.go index 3bec446..b3965c5 100644 --- a/controllers/sdk.go +++ b/controllers/sdk.go @@ -36,6 +36,7 @@ Sort int `json:"sort"` //鍙傛暟椤哄簭 } +/* // @Summary 绠楁硶淇濆瓨 // @Description 绠楁硶淇濆瓨 // @Produce json @@ -44,6 +45,7 @@ // @Success 200 {string} json "{"code":200, msg:"璇锋眰澶勭悊鎴愬姛",data:"",success:true}" // @Failure 500 {string} json "{"code":500, msg:"璇锋眰澶辫触",data:"",success:false}" // @Router /data/api-v/sdk/save [POST] +*/ func (sc SdkController) Save(c *gin.Context) { var sdk SdkVo var api dbapi.SdkApi @@ -61,6 +63,7 @@ } } +/* // @Summary 鏌ユ壘鎵�鏈夌畻娉� // @Description 鏌ユ壘鎵�鏈夌畻娉� // @Produce json @@ -69,6 +72,7 @@ // @Success 200 {string} json "{"code":200, msg:"璇锋眰澶勭悊鎴愬姛",data:"绠楁硶鍒楄〃",success:true}" // @Failure 500 {string} json "{"code":500, msg:"璇锋眰澶辫触",data:"[]",success:false}" // @Router /data/api-v/sdk/findAllSdk [GET] +*/ func (sc SdkController) FindAllSdk(c *gin.Context) { var api dbapi.SdkApi @@ -77,6 +81,7 @@ util.ResponseFormat(c, code.Success, sdks) } +/* // @Summary 鏍规嵁id鑾峰彇绠楁硶淇℃伅 // @Description 鏍规嵁id鑾峰彇绠楁硶淇℃伅 // @Produce json @@ -85,6 +90,7 @@ // @Success 200 {string} json "{"code":200, msg:"璇锋眰澶勭悊鎴愬姛",data:"绠楁硶淇℃伅",success:true}" // @Failure 500 {string} json "{"code":500, msg:"璇锋眰澶辫触",data:"",success:false}" // @Router /data/api-v/sdk/getById [GET] +*/ func (sc SdkController) GetById(c *gin.Context) { var api dbapi.SdkApi sdkId := c.Query("id") @@ -102,7 +108,9 @@ } } +/* // @Router /data/api-v/sdkArg/getSdkArgs [get] +*/ func (sc SdkController) GetSdkArgs(c *gin.Context) { sdkId := c.Query("sdkId") scope := c.Query("scope") @@ -119,6 +127,7 @@ } } +/* // @Summary 鏍规嵁taskId鑾峰彇绠楁硶淇℃伅 // @Description 鏍规嵁taskId鑾峰彇绠楁硶淇℃伅 // @Produce json @@ -127,6 +136,7 @@ // @Success 200 {string} json "{"code":200, msg:"璇锋眰澶勭悊鎴愬姛",data:"绠楁硶淇℃伅",success:true}" // @Failure 500 {string} json "{"code":500, msg:"璇锋眰澶辫触",data:"",success:false}" // @Router /data/api-v/sdk/findByTaskId [GET] +*/ func (sc SdkController) FindByTaskId(c *gin.Context) { var api dbapi.SdkApi taskId := c.Query("taskId") diff --git a/controllers/sysMenu.go b/controllers/sysMenu.go index f629b5d..1010498 100644 --- a/controllers/sysMenu.go +++ b/controllers/sysMenu.go @@ -12,6 +12,7 @@ } +/* // @Summary 褰撳墠鐢ㄦ埛鐨勭郴缁熻彍鍗� // @Description 褰撳墠鐢ㄦ埛鐨勭郴缁熻彍鍗� // @Accept json @@ -20,6 +21,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}" // @Router /data/api-v/sysmenus/me [get] +*/ func (controller SysMenuController) Me(c *gin.Context) { module := c.Param("module") logger.Debug("me.module:",module) diff --git a/controllers/syssetcont.go b/controllers/syssetcont.go index 61a4116..fe25b70 100644 --- a/controllers/syssetcont.go +++ b/controllers/syssetcont.go @@ -42,8 +42,8 @@ UpdateTime string `json:"UpdateTime"` } -// @Summary 瀛樺偍淇℃伅鏌ヨ -// @Description 瀛樺偍淇℃伅鏌ヨ +// @Summary 鍩虹璁剧疆鏌ヨ +// @Description 鍩虹璁剧疆鏌ヨ // @Accept json // @Produce json // @Tags sysset @@ -60,8 +60,8 @@ } } -// @Summary 瀛樺偍淇℃伅淇敼 -// @Description 瀛樺偍淇℃伅淇敼 +// @Summary 鎶ヨ璁剧疆淇敼 +// @Description 鎶ヨ璁剧疆淇敼 // @Accept json // @Produce json // @Tags sysset @@ -86,8 +86,8 @@ } } -// @Summary 瀛樺偍淇℃伅淇敼 -// @Description 瀛樺偍淇℃伅淇敼 +// @Summary 鎶ヨ鏃堕暱淇敼 +// @Description 鎶ヨ鏃堕暱淇敼 // @Accept json // @Produce json // @Tags sysset diff --git a/controllers/taglist.go b/controllers/taglist.go index 107532e..b601422 100644 --- a/controllers/taglist.go +++ b/controllers/taglist.go @@ -8,7 +8,7 @@ "github.com/gin-gonic/gin" ) -// @Summary 鏍囩鍒楄〃 +// @Summary 搴曞簱鏍囩鍒楄〃 // @Description 杩斿洖搴曞簱鏍囩 // @Accept json // @Produce json diff --git a/controllers/task.go b/controllers/task.go index f27e9d0..999f82e 100644 --- a/controllers/task.go +++ b/controllers/task.go @@ -34,6 +34,7 @@ FaceExtract_VirtualSdkId = "virtual-faceextract-sdk-pull"//缁撴灉杈撳嚭鐨勭畻娉昳d ) +/* // @Summary 鏌ユ壘鎵�鏈変换鍔★紝鍖呭惈浠诲姟淇℃伅鍜屽搴旂殑绠楁硶淇℃伅 // @Description 鏌ユ壘鎵�鏈変换鍔� // @Produce json @@ -41,6 +42,7 @@ // @Success 200 {string} json "{"code":200, msg:"璇锋眰澶勭悊鎴愬姛",data:"",success:true}" // @Failure 500 {string} json "{"code":500, msg:"璇锋眰澶辫触",data:"",success:false}" // @Router /data/api-v/task/findAll [GET] +*/ func (tc TaskController) FindAll(c *gin.Context) { // 鏄剧ず鎵�鏈変换鍔�: 鑾峰彇淇℃伅 var taskApi dbapi.TaskApi @@ -65,6 +67,7 @@ } } +/* // @Summary 娣诲姞浠诲姟 // @Description 鏌ユ壘鎵�鏈変换鍔� // @Accept json @@ -74,6 +77,7 @@ // @Success 200 {string} json "{"code":200, msg:"璇锋眰澶勭悊鎴愬姛",data:"",success:true}" // @Failure 500 {string} json "{"code":500, msg:"璇锋眰澶辫触",data:"",success:false}" // @Router /data/api-v/task/addTask [POST] +*/ func (tc TaskController) AddTask(c *gin.Context) { var task TaskVo var taskApi dbapi.TaskApi @@ -101,6 +105,7 @@ Sort int `json:"sort"` } +/* // @Summary 缁欎换鍔℃坊鍔犵畻娉� // @Description 浠诲姟娣诲姞绠楁硶 // @Produce json @@ -109,6 +114,7 @@ // @Success 200 {string} json "{"code":200, msg:"璇锋眰澶勭悊鎴愬姛",data:"",success:true}" // @Failure 500 {string} json "{"code":500, msg:"璇锋眰澶辫触",data:"",success:false}" // @Router /data/api-v/task/addTaskSdk [post] +*/ func (tc TaskController) AddTaskSdk(c *gin.Context) { var addVo TaskSdkAdd err := c.BindJSON(&addVo) @@ -126,6 +132,7 @@ } } +/* // @Summary 浠诲姟鍒犻櫎绠楁硶 // @Description 鏍规嵁taskid鍜宻dkid鍒犻櫎 // @Produce json @@ -135,6 +142,7 @@ // @Success 200 {string} json "{"code":200, msg:"璇锋眰澶勭悊鎴愬姛",data:"",success:true}" // @Failure 500 {string} json "{"code":500, msg:"璇锋眰澶辫触",data:"",success:false}" // @Router /data/api-v/task/delTaskSdk [GET] +*/ func (tc TaskController) DeleteTaskSdk(c *gin.Context) { var taskApi dbapi.TaskApi taskId := c.Query("taskId") @@ -151,6 +159,7 @@ } } +/* // @Summary 鏇存柊浠诲姟鍚嶇О // @Description 鏇存柊浠诲姟鍚嶇О // @Produce json @@ -160,6 +169,7 @@ // @Success 200 {string} json "{"code":200, msg:"",data:"",success:true}" // @Failure 500 {string} json "{"code":500, msg:"",data:"",success:false}" // @Router /data/api-v/task/updateTaskName [POST] +*/ func (tc TaskController) UpdateTaskName(c *gin.Context) { taskId := c.PostForm("taskId") taskName := c.PostForm("taskName") @@ -181,6 +191,7 @@ Enable bool `json:"enable"` } +/* // @Summary 鏇存柊浠诲姟鐘舵�� // @Description 锛堢畻娉曚笉鍙�,鍙洿鏂颁换鍔$姸鎬侊級 // @Produce json @@ -189,6 +200,7 @@ // @Success 200 {string} json "{"code":200, msg:"璇锋眰澶勭悊鎴愬姛",data:"",success:true}" // @Failure 500 {string} json "{"code":500, msg:"璇锋眰澶辫触",data:"",success:false}" // @Router /data/api-v/task/updateTaskStatus [POST] +*/ func (tc TaskController) UpdateTaskStatus(c *gin.Context) { var tsvo TaskStatusVo err := c.BindJSON(&tsvo) @@ -207,6 +219,7 @@ } +/* // @Summary 鍒犻櫎浠诲姟 // @Description 鏍规嵁浠诲姟id鍒犻櫎浠诲姟 // @Produce json @@ -215,6 +228,7 @@ // @Success 200 {string} json "{"code":200, msg:"璇锋眰澶勭悊鎴愬姛",data:"",success:true}" // @Failure 500 {string} json "{"code":500, msg:"璇锋眰澶辫触",data:"",success:false}" // @Router /data/api-v/task/delete [GET] +*/ func (tc TaskController) DeleteTask(c *gin.Context) { var taskApi dbapi.TaskApi taskId := c.Query("taskId") @@ -244,6 +258,7 @@ SdkArgValue string `json:"sdk_arg_value"` } +/* // @Summary 淇濆瓨绠楁硶瑙勫垯 // @Description 淇濆瓨绠楁硶瑙勫垯 // @Accept json @@ -253,6 +268,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/task/saveTaskSdkRule [post] +*/ func (tc TaskController) SaveTaskSdkRule(c *gin.Context) { var rules TaskSdkRules err := c.BindJSON(&rules) @@ -270,6 +286,7 @@ } } +/* // @Summary 鍒犻櫎绠楁硶瑙勫垯 // @Description 鍒犻櫎绠楁硶瑙勫垯 // @Produce json @@ -278,6 +295,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/task/deleteTaskSdkRule [post] +*/ func (tc TaskController) DeleteTaskSdkRule(c *gin.Context) { taskId := c.PostForm("taskId") sdkId := c.PostForm("sdkId") @@ -294,6 +312,7 @@ } +/* // @Summary 鏌ヨ绠楁硶瑙勫垯 // @Description 鏌ヨ绠楁硶瑙勫垯 // @Produce json @@ -303,6 +322,7 @@ // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" // @Router /data/api-v/task/getRulesByTaskSdk [get] +*/ func (tc TaskController) GetRulesByTaskSdk(c *gin.Context) { taskId := c.Query("taskId") sdkId := c.Query("sdkId") diff --git a/controllers/tasklist.go b/controllers/tasklist.go index c49a822..820e9d9 100644 --- a/controllers/tasklist.go +++ b/controllers/tasklist.go @@ -16,8 +16,8 @@ // @Accept json // @Produce json // @Tags es -// @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true}" -// @Failure 500 {string} json "{"code":500, msg:"杩斿洖閿欒淇℃伅", success:false}" +// @Success 200 {string} json "{"code":200, msg:"", success:true}" +// @Failure 500 {string} json "{"code":500, msg:"", success:false}" // @Router /data/api-v/es/tagList [POST] func (sc *EsSearchController) PostEsTaskList(c *gin.Context) { diff --git a/controllers/user.go b/controllers/user.go index 0f0b1e2..d12deff 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -72,12 +72,16 @@ c.JSON(http.StatusUnauthorized,"") } } +/* // @Router /data/api-u/sys/refresh_token [post] +*/ func (controller UserController) RefreshToken(c *gin.Context){ } +/* // @Router /data/api-u/sys/logout [get] +*/ func (controller UserController) Logout(c *gin.Context){ c.JSON(http.StatusOK,"閫�鍑烘垚鍔�") } \ No newline at end of file -- Gitblit v1.8.0