| | |
| | | import ( |
| | | "basic.com/dbapi.git" |
| | | "github.com/gin-gonic/gin" |
| | | "strconv" |
| | | "webserver/extend/code" |
| | | "webserver/extend/util" |
| | | ) |
| | |
| | | // @Produce json |
| | | // @Tags 本地文件 |
| | | // @Param fileName query string false "根据文件名称查询" |
| | | // @Param page query int true "当前页" |
| | | // @Param size query int 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/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")) |
| | | var api dbapi.FileAnalysisApi |
| | | b, d := api.FindAllFile(fileName) |
| | | b, d := api.FindAllFile(fileName, page, size) |
| | | if b { |
| | | util.ResponseFormat(c,code.Success, d) |
| | | } else { |
| | |
| | | |
| | | type SortVo struct { |
| | | Id string `json:"id" binding:"required"` |
| | | Direct int `json:"direct" binding:"required" example:"1:向上,2:向下"` |
| | | Direct int `json:"direct" binding:"required"` |
| | | } |
| | | |
| | | type FileStatusVo struct { |
| | |
| | | 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 开启或暂停文件分析 |