| | |
| | | "webserver/extend/config" |
| | | "webserver/extend/esutil" |
| | | "webserver/extend/util" |
| | | "strconv" |
| | | ) |
| | | |
| | | //标签列表 |
| | |
| | | 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) |
| | |
| | | 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) |