From 8d96031e186d76b1b4d7d28350b43e02d76149ab Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期六, 28 九月 2019 18:00:23 +0800
Subject: [PATCH] update virtualIp

---
 controllers/cluster.go |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/controllers/cluster.go b/controllers/cluster.go
index 5e9314c..6692323 100644
--- a/controllers/cluster.go
+++ b/controllers/cluster.go
@@ -40,6 +40,7 @@
 	Password string `json:"password"`
 	ClusterName string `json:"clusterName"`
 	ClusterId string `json:"clusterId"`
+	VirtualIp string `json:"virtualIp"`
 }
 
 type ClusterSearchVo struct {
@@ -70,7 +71,7 @@
 		return
 	}
 	var api dbapi.ClusterApi
-	b, d := api.Create(clusterVo.ClusterName, clusterVo.Password)
+	b, d := api.Create(clusterVo.ClusterName, clusterVo.Password, clusterVo.VirtualIp)
 	if b {
 		util.ResponseFormat(c,code.Success, d)
 	} else {
@@ -198,7 +199,8 @@
 // @Description 淇濆瓨闆嗙兢鍚嶇О
 // @Produce json
 // @Tags cluster
-// @Param  clusterName query string true "闆嗙兢鍚嶇О"
+// @Param clusterName formData string true "闆嗙兢鍚嶇О"
+// @Param virtualIp formData string false "铏氭嫙ip"
 // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
 // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
 // @Router /data/api-v/cluster/updateClusterName [post]
@@ -208,8 +210,9 @@
 		util.ResponseFormat(c,code.RequestParamError, "鍙傛暟鏈夎")
 		return
 	}
+	virtualIp := c.PostForm("virtualIp")
 	var api dbapi.ClusterApi
-	b,_ := api.UpdateClusterName(clusterName)
+	b,_ := api.UpdateClusterName(clusterName,virtualIp)
 	if b {
 		util.ResponseFormat(c,code.UpdateSuccess,"鏇存柊鎴愬姛")
 	} else {

--
Gitblit v1.8.0