|
@@ -783,9 +783,24 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}) {
|
|
fmt.Println(queryStr)
|
|
fmt.Println(queryStr)
|
|
start1 := time.Now().Unix()
|
|
start1 := time.Now().Unix()
|
|
fmt.Println(start1)
|
|
fmt.Println(start1)
|
|
- count, data := elastic.GetWithCount(yysIndex, yysType, "", queryStr)
|
|
|
|
|
|
+ var count int64
|
|
|
|
+ var data *[]map[string]interface{}
|
|
|
|
+ count, data = elastic.GetWithCount(yysIndex, yysType, "", queryStr)
|
|
end1 := time.Now().Unix()
|
|
end1 := time.Now().Unix()
|
|
fmt.Println(end1)
|
|
fmt.Println(end1)
|
|
fmt.Println("时差", end1-start1)
|
|
fmt.Println("时差", end1-start1)
|
|
- return count, data
|
|
|
|
|
|
+ if len(*data) > 0 {
|
|
|
|
+ //查询tidb真实数据
|
|
|
|
+ idArr := []string{}
|
|
|
|
+ for _, v := range *data {
|
|
|
|
+ id := gconv.String(v["id"])
|
|
|
|
+ idArr = append(idArr, id)
|
|
|
|
+ }
|
|
|
|
+ data = IC.BiMysql.SelectBySql("select * from customer_data where id in (?) ",
|
|
|
|
+ strings.Join(idArr, ","))
|
|
|
|
+ return count, data
|
|
|
|
+ } else {
|
|
|
|
+ return count, &[]map[string]interface{}{}
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|