sunty
2019-07-12 d42b09cda8b2bc58c43c200f3aabdb0b2a7e9211
controllers/taglist.go
@@ -25,16 +25,16 @@
   url := "http://" + config.EsInfo.Masterip + ":" + config.EsInfo.Httpport +
      "/" + config.EsInfo.EsIndex.DbTables.IndexName + "/_search"
   prama := "{\"query\":{\"match_all\":{}},\"_source\":[\"tableName\",\"uuid\"]}"
   prama := "{\"query\":{\"bool\":{\"filter\":[{\"term\":{\"isDelete\":0}}]}},\"_source\":[\"tableName\",\"id\"]}"
   tokenRes := esutil.GetEsDataReq(url, prama, true)
   sources := make([]map[string]interface{}, 0)
   fmt.Println(tokenRes["datalist"].([]interface{}))
   for _, value := range tokenRes["datalist"].([]interface{}) {
      tokenRes := make(map[string]interface{})
      tokenRes["key"] = value.(map[string]interface{})["uuid"].(string)
      tokenRes["key"] = value.(map[string]interface{})["id"].(string)
      tokenRes["title"] = value.(map[string]interface{})["tableName"].(string)
      tokenRes["value"] = value.(map[string]interface{})["uuid"].(string)
      tokenRes["value"] = value.(map[string]interface{})["id"].(string)
      sources = append(sources, tokenRes)
   }
   util.ResponseFormat(c, code.Success, sources)