master
huanghai 5 years ago
parent 472596ed93
commit f8f9704d95

@ -10,7 +10,6 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/go-redis/redis/v8" "github.com/go-redis/redis/v8"
"github.com/mitchellh/mapstructure"
"github.com/xormplus/builder" "github.com/xormplus/builder"
"reflect" "reflect"
"strconv" "strconv"
@ -48,18 +47,6 @@ func QueryMapArrayByIds(ids []string, tableName string) []map[string]interface{}
return getListByIds(ids, GetBean(tableName)) return getListByIds(ids, GetBean(tableName))
} }
/**
idsbean( output &teacher)
2020-06-24
*/
func QueryModelArrayByIds(ids []string, tableName string,output interface{}){
mapInstance:= getListByIds(ids, GetBean(tableName))
err := mapstructure.Decode(mapInstance, output)
if err != nil {
fmt.Println(err)
}
}
func getListByIds(ids []string, m Selector) []map[string]interface{} { func getListByIds(ids []string, m Selector) []map[string]interface{} {
//1、第一步从缓存读取 //1、第一步从缓存读取

Loading…
Cancel
Save