|
@@ -411,6 +411,19 @@ func (m *Mysql) Count(tableName string, query map[string]interface{}) int64 {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if rv_k.String() == "in" {
|
|
|
|
+ if len(rv.MapIndex(rv_k).Interface().([]interface{})) > 0 {
|
|
|
|
+ _fs := fmt.Sprintf("%s in (?", k)
|
|
|
|
+ for k, v := range rv.MapIndex(rv_k).Interface().([]interface{}) {
|
|
|
|
+ if k > 0 {
|
|
|
|
+ _fs += ",?"
|
|
|
|
+ }
|
|
|
|
+ values = append(values, v)
|
|
|
|
+ }
|
|
|
|
+ _fs += ")"
|
|
|
|
+ fields = append(fields, _fs)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else if v == "$isNull" {
|
|
} else if v == "$isNull" {
|
|
fields = append(fields, fmt.Sprintf("%s is null", k))
|
|
fields = append(fields, fmt.Sprintf("%s is null", k))
|