接入搜索功能
This commit is contained in:
+3
-3
@@ -708,7 +708,7 @@ func (that *HoTimeDB) varCond(k string, v interface{}) (string, []interface{}) {
|
||||
res = append(res, v.(Slice)[0])
|
||||
res = append(res, v.(Slice)[1])
|
||||
default:
|
||||
if reflect.ValueOf(v).Type().String() == "hotime.Slice" {
|
||||
if reflect.ValueOf(v).Type().String() == "common.Slice" {
|
||||
where += "`" + k + "` IN ("
|
||||
res = append(res, v.(Slice)...)
|
||||
if len(v.(Slice)) == 0 {
|
||||
@@ -739,7 +739,7 @@ func (that *HoTimeDB) varCond(k string, v interface{}) (string, []interface{}) {
|
||||
//fmt.Println(reflect.ValueOf(v).Type().String())
|
||||
if v == nil {
|
||||
where += "`" + k + "` IS NULL"
|
||||
} else if reflect.ValueOf(v).Type().String() == "hotime.Slice" {
|
||||
} else if reflect.ValueOf(v).Type().String() == "common.Slice" {
|
||||
|
||||
//fmt.Println(v)
|
||||
where += "`" + k + "` IN ("
|
||||
@@ -782,7 +782,7 @@ func (that *HoTimeDB) notIn(k string, v interface{}, where string, res []interfa
|
||||
|
||||
where += "`" + k + "` IS NOT NULL "
|
||||
|
||||
} else if reflect.ValueOf(v).Type().String() == "hotime.Slice" {
|
||||
} else if reflect.ValueOf(v).Type().String() == "common.Slice" {
|
||||
where += "`" + k + "` NOT IN ("
|
||||
res = append(res, v.(Slice)...)
|
||||
for i := 0; i < len(v.(Slice)); i++ {
|
||||
|
||||
Reference in New Issue
Block a user