From 0cc8d28ff6bae56fe8f4388aedd4ab1d46a11c96 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 24 七月 2019 19:03:39 +0800
Subject: [PATCH] config compServerList

---
 controllers/dbtablesCon.go |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/controllers/dbtablesCon.go b/controllers/dbtablesCon.go
index 2eb472c..e74d046 100644
--- a/controllers/dbtablesCon.go
+++ b/controllers/dbtablesCon.go
@@ -72,7 +72,7 @@
 		fmt.Println("body涓幏鍙栧簳搴搃d")
 	}
 	url := "http://" + config.EsInfo.Masterip + ":" + config.EsInfo.Httpport +
-		"/" + config.EsInfo.EsIndex.DbTables.IndexName + "/" + config.EsInfo.EsIndex.DbTables.IndexType + "/" + uuid + "/_update"
+		"/" + config.EsInfo.EsIndex.DbTables.IndexName + "/" + config.EsInfo.EsIndex.DbTables.IndexType + "/" + uuid + "/_update?refresh=wait_for"
 	dbtable.PriUpdate()
 	dbTableByte, err := json.Marshal(dbtable)
 	if err != nil {
@@ -108,7 +108,7 @@
 	tableId := uuid.NewV4().String()
 	dbtable.Id = tableId
 	url := "http://" + config.EsInfo.Masterip + ":" + config.EsInfo.Httpport +
-		"/" + config.EsInfo.EsIndex.DbTables.IndexName + "/" + config.EsInfo.EsIndex.DbTables.IndexType + "/" + tableId
+		"/" + config.EsInfo.EsIndex.DbTables.IndexName + "/" + config.EsInfo.EsIndex.DbTables.IndexType + "/" + tableId + "?refresh=wait_for"
 	dbtable.PriInsert() // 娣诲姞鏃堕棿鍜屽垱寤轰汉
 	dbTableByte, err := json.Marshal(dbtable)
 	if err != nil {
@@ -137,11 +137,11 @@
 // @Param uuid path string true "搴曞簱id "
 // @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true}"
 // @Failure 500 {string} json "{"code":500,  msg:"杩斿洖閿欒淇℃伅", success:false}"
-// @Router /data/api-v/dbtable/deleteDBtablesById/{uuid} [POST]
+// @Router /data/api-v/dbtable/deleteDBtablesById/{id} [POST]
 func (dbt DbTableController) DeleteDbTables(c *gin.Context) {
 	uuid := c.Params.ByName("id")
 	url := "http://" + config.EsInfo.Masterip + ":" + config.EsInfo.Httpport +
-		"/" + config.EsInfo.EsIndex.DbTables.IndexName + "/" + config.EsInfo.EsIndex.DbTables.IndexType + "/" + uuid + "/_update"
+		"/" + config.EsInfo.EsIndex.DbTables.IndexName + "/" + config.EsInfo.EsIndex.DbTables.IndexType + "/" + uuid + "/_update?refresh=wait_for"
 	params := "{\"doc\":{\"isDelete\":\"1\"}}"
 	fmt.Print("鍒犻櫎璇锋眰url:%s;\n 璇锋眰鍙傛暟params:%s", url, params)
 	data := esutil.GetEsDataReq(url, params, false)

--
Gitblit v1.8.0