From 805324d0ddac6215f8250c616c979c77a3a4f9f3 Mon Sep 17 00:00:00 2001 From: sunty <suntianyu0923@163.com> Date: 星期五, 26 七月 2019 15:46:56 +0800 Subject: [PATCH] fix bug --- controllers/taglist.go | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/controllers/taglist.go b/controllers/taglist.go index 6ad4914..565ca95 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\",\"id\"]}" + 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