From 379dcbe019f9283f8dc594f582b61523ec458989 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期二, 03 十二月 2019 14:34:04 +0800
Subject: [PATCH] fix

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

diff --git a/controllers/fileAnalysis.go b/controllers/fileAnalysis.go
index da6c3af..9009f14 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{}{})
 	}

--
Gitblit v1.8.0