From bae7a9a30b89c519460746cfa19cd7e66a0196e2 Mon Sep 17 00:00:00 2001 From: sunty <1172534965@qq.com> Date: 星期日, 19 一月 2020 17:13:07 +0800 Subject: [PATCH] update _source list and struct --- controllers/fileAnalysis.go | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/controllers/fileAnalysis.go b/controllers/fileAnalysis.go index b644acd..863601c 100644 --- a/controllers/fileAnalysis.go +++ b/controllers/fileAnalysis.go @@ -3,6 +3,7 @@ import ( "basic.com/dbapi.git" "github.com/gin-gonic/gin" + "strconv" "webserver/extend/code" "webserver/extend/util" ) @@ -17,13 +18,19 @@ // @Produce json // @Tags 鏈湴鏂囦欢 // @Param fileName query string false "鏍规嵁鏂囦欢鍚嶇О鏌ヨ" +// @Param page query int true "褰撳墠椤�" +// @Param size query int true "姣忛〉鏁伴噺" +// @Param type query int true "0:澶勭悊瀹屾垚锛�1:澶勭悊涓紝2:鏈厤瑙勫垯锛�3:澶勭悊澶辫触" // @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") + page,_ := strconv.Atoi(c.Query("page")) + size,_ := strconv.Atoi(c.Query("size")) + fType,_ := strconv.Atoi(c.Query("type")) var api dbapi.FileAnalysisApi - b, d := api.FindAllFile(fileName) + b, d := api.FindAllFile(fileName, fType, page, size) if b { util.ResponseFormat(c,code.Success, d) } else { @@ -46,6 +53,12 @@ Status int `json:"status" binding:"required"` } +const ( + File_Img_Id_Pre = "img_" + File_Video_Id_Pre = "video_" + File_Audio_Id_Pre = "audio_" +) + // @Security ApiKeyAuth // @Summary 寮�鍚垨鏆傚仠鏂囦欢鍒嗘瀽 // @Description 寮�鍚垨鏆傚仠鏂囦欢鍒嗘瀽 -- Gitblit v1.8.0