|
|
|
@ -10,7 +10,6 @@ import (
|
|
|
|
|
"encoding/json"
|
|
|
|
|
"fmt"
|
|
|
|
|
"github.com/go-redis/redis/v8"
|
|
|
|
|
"github.com/mitchellh/mapstructure"
|
|
|
|
|
"github.com/xormplus/builder"
|
|
|
|
|
"reflect"
|
|
|
|
|
"strconv"
|
|
|
|
@ -48,18 +47,6 @@ func QueryMapArrayByIds(ids []string, tableName string) []map[string]interface{}
|
|
|
|
|
return getListByIds(ids, GetBean(tableName))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
功能:根据 ids获取到对应表中的实体bean数组( 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{} {
|
|
|
|
|
//1、第一步从缓存读取
|
|
|
|
|