|
@@ -820,16 +820,18 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}) {
|
|
|
fmt.Println("时差", end1-start1)
|
|
|
if len(*data) > 0 {
|
|
|
//查询tidb真实数据
|
|
|
- idArr := []string{}
|
|
|
+ idArr := []interface{}{}
|
|
|
+ wh := []string{}
|
|
|
for _, v := range *data {
|
|
|
id := gconv.String(v["id"])
|
|
|
idArr = append(idArr, id)
|
|
|
+ wh = append(wh, "?")
|
|
|
}
|
|
|
|
|
|
- sqlStr := fmt.Sprintf(`select * from customer_data where FIND_IN_SET (id,?) %s `, mysqlOrderStr)
|
|
|
- fmt.Println(sqlStr, strings.Join(idArr, ","))
|
|
|
+ sqlStr := fmt.Sprintf(`select * from customer_data where id in (%s) %s `, strings.Join(wh, ","), mysqlOrderStr)
|
|
|
+ fmt.Println(sqlStr, idArr)
|
|
|
data = IC.BiMysql.SelectBySql(sqlStr,
|
|
|
- strings.Join(idArr, ","))
|
|
|
+ idArr...)
|
|
|
return count, data
|
|
|
} else {
|
|
|
return count, &[]map[string]interface{}{}
|