增加导出功能

This commit is contained in:
hoteas
2022-08-01 03:40:09 +08:00
parent 4e24a913c6
commit 3da135e3cb
6 changed files with 168 additions and 12 deletions
+3 -2
View File
@@ -6,6 +6,7 @@ import (
"database/sql"
"encoding/json"
"errors"
"fmt"
_ "github.com/go-sql-driver/mysql"
_ "github.com/mattn/go-sqlite3"
"github.com/sirupsen/logrus"
@@ -618,8 +619,8 @@ func (that *HoTimeDB) where(data Map) (string, []interface{}) {
if v != nil && reflect.ValueOf(v).Type().String() == "common.Slice" && len(v.(Slice)) == 0 {
continue
}
if v != nil && reflect.ValueOf(v).Type().String() == "[]interface {}" && len(v.([]interface{})) == 0 {
fmt.Println(reflect.ValueOf(v).Type().String())
if v != nil && strings.Contains(reflect.ValueOf(v).Type().String(), "[]") && len(ObjToSlice(v)) == 0 {
continue
}