From 06a5b7be21e8c05bf3695754fe6f4714a7fccd68 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 26 七月 2019 16:46:23 +0800
Subject: [PATCH] fix local and sync table

---
 controllers/taglist.go |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/controllers/taglist.go b/controllers/taglist.go
index fda7488..746402f 100644
--- a/controllers/taglist.go
+++ b/controllers/taglist.go
@@ -8,6 +8,7 @@
 	"webserver/extend/config"
 	"webserver/extend/esutil"
 	"webserver/extend/util"
+	"strconv"
 )
 
 //鏍囩鍒楄〃
@@ -25,7 +26,7 @@
 	url := "http://" + config.EsInfo.Masterip + ":" + config.EsInfo.Httpport +
 		"/" + config.EsInfo.EsIndex.DbTables.IndexName + "/_search"
 
-	prama := "{\"query\":{\"bool\":{\"filter\":[{\"term\":{\"isDelete\":0}}]}},\"_source\":[\"tableName\",\"uuid\"]}"
+	prama := "{\"query\":{\"bool\":{\"filter\":[]}},\"_source\":[\"tableName\",\"id\",\"isDelete\"]}"
 
 	tokenRes := esutil.GetEsDataReq(url, prama, true)
 	sources := make([]map[string]interface{}, 0)
@@ -35,7 +36,9 @@
 		tokenRes["key"] = value.(map[string]interface{})["id"].(string)
 		tokenRes["title"] = value.(map[string]interface{})["tableName"].(string)
 		tokenRes["value"] = value.(map[string]interface{})["id"].(string)
+		status := int(value.(map[string]interface{})["isDelete"].(float64))
+		 tokenRes["status"] = strconv.Itoa(status)
 		sources = append(sources, tokenRes)
 	}
 	util.ResponseFormat(c, code.Success, sources)
-}
+}
\ No newline at end of file

--
Gitblit v1.8.0