| | |
| | | util.ResponseFormat(c,code.UpgradeFail,err.Error()) |
| | | } |
| | | } |
| | | |
| | | // @Security ApiKeyAuth |
| | | // @Summary 算法安装包开始安装 |
| | | // @Description 算法安装包开始安装 |
| | | // @Accept multipart/form-data |
| | | // @Produce json |
| | | // @Tags sysset |
| | | // @Param identifier formData string true "整个文件的唯一标识,目前是md5" |
| | | // @Param filename formData string true "文件名称" |
| | | // @Success 200 {string} json "{"code":200, msg:"", success:true}" |
| | | // @Failure 500 {string} json "{"code":500, msg:"", success:false}" |
| | | // @Router /data/api-v/sysset/sdkInstall [post] |
| | | func (sset SysSetController) SdkInstall(c *gin.Context) { |
| | | identifier := c.Request.FormValue("identifier") |
| | | filename := c.Request.FormValue("filename") |
| | | if identifier == "" || filename == "" { |
| | | util.ResponseFormat(c,code.RequestParamError,"") |
| | | return |
| | | } |
| | | var sv service.SysService |
| | | if b,err := sv.SdkInstall(identifier, filename);b { |
| | | util.ResponseFormat(c,code.UpgradeSuccess,"算法安装成功") |
| | | } else { |
| | | util.ResponseFormat(c,code.UpgradeFail,err.Error()) |
| | | } |
| | | } |