From a11899cbef7d87fd0b61c7b6e51447e858c4e899 Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期五, 20 十二月 2019 16:24:56 +0800 Subject: [PATCH] add log --- controllers/syssetcont.go | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/controllers/syssetcont.go b/controllers/syssetcont.go index 2dd3ccd..bdd04a8 100644 --- a/controllers/syssetcont.go +++ b/controllers/syssetcont.go @@ -543,4 +543,31 @@ } else { util.ResponseFormat(c, code.ComError, "") } +} + + +// @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/upgrade [post] +func (sset SysSetController) Upgrade(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.Upgrade(identifier, filename);b { + util.ResponseFormat(c,code.UpgradeSuccess,"鍗囩骇鎴愬姛") + } else { + util.ResponseFormat(c,code.UpgradeFail,err.Error()) + } } \ No newline at end of file -- Gitblit v1.8.0