From b9cfbd535a56710b45bf99d46d0cf1a0a31a6f5b Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 04 十二月 2019 13:54:45 +0800
Subject: [PATCH] fix swagger

---
 controllers/fileAnalysis.go |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/controllers/fileAnalysis.go b/controllers/fileAnalysis.go
index da6c3af..6fd5fa4 100644
--- a/controllers/fileAnalysis.go
+++ b/controllers/fileAnalysis.go
@@ -16,15 +16,16 @@
 // @Description 鑾峰彇鏈湴鏂囦欢鍒楄〃
 // @Produce json
 // @Tags 鏈湴鏂囦欢
+// @Param fileName 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/fileAnalysis/findAllFile [get]
 func (fac FileAnalysisController) FindAllFile(c *gin.Context) {
 	fileName := c.Query("fileName")
 	var api dbapi.FileAnalysisApi
-	arr, _ := api.FindAllFile(fileName)
-	if arr !=nil && len(arr) >0 {
-		util.ResponseFormat(c,code.Success,arr)
+	b, d := api.FindAllFile(fileName)
+	if b {
+		util.ResponseFormat(c,code.Success, d)
 	} else {
 		util.ResponseFormat(c,code.Success,[]interface{}{})
 	}
@@ -51,7 +52,7 @@
 // @Accept json
 // @Produce json
 // @Tags 鏈湴鏂囦欢
-// Param reqBody body controllers.FileStatusVo true "寮�鍚殏鍋滃弬鏁�,鏆傚仠status=0锛屽紑鍚痵tatus=1"
+// @Param reqBody body controllers.FileStatusVo true "寮�鍚殏鍋滃弬鏁�,鏆傚仠status=0锛屽紑鍚痵tatus=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/fileAnalysis/updateStatus [post]
@@ -77,7 +78,7 @@
 // @Accept json
 // @Produce json
 // @Tags 鏈湴鏂囦欢
-// Param reqBody body controllers.IdArrVo true "鍒犻櫎鏂囦欢id鍒楄〃"
+// @Param reqBody body controllers.IdArrVo 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/fileAnalysis/delete [post]
@@ -108,7 +109,7 @@
 // @Accept json
 // @Produce json
 // @Tags 鏈湴鏂囦欢
-// Param reqBody body controllers.SortVo true "鎺掑簭鍙傛暟,鍚戜笂direct=1锛屽悜涓媎irect=2"
+// @Param reqBody body controllers.SortVo true "鎺掑簭鍙傛暟,鍚戜笂direct=1锛屽悜涓媎irect=2"
 // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
 // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
 // @Router /data/api-v/fileAnalysis/sortFile [post]

--
Gitblit v1.8.0