From 94bcda3ef533ac0ab0f5c0786554a9efe4c27f4d Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期四, 19 十二月 2019 13:37:13 +0800
Subject: [PATCH] add upgrade action,do nothing after patch upload

---
 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