From 0bb9a4c37862e5098a596e121fb13fd12c2ca44f Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期五, 29 五月 2020 14:14:15 +0800
Subject: [PATCH] install sdk tar.gz

---
 controllers/syssetcont.go |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/controllers/syssetcont.go b/controllers/syssetcont.go
index cfcbe72..396b781 100644
--- a/controllers/syssetcont.go
+++ b/controllers/syssetcont.go
@@ -635,3 +635,29 @@
 		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())
+	}
+}

--
Gitblit v1.8.0