接入RESTfull风格接口
This commit is contained in:
@@ -142,7 +142,7 @@ func (that *HoTimeDB) Row(resl *sql.Rows) []Map {
|
||||
if a[j] != nil && reflect.ValueOf(a[j]).Type().String() == "[]uint8" {
|
||||
lis[strs[j]] = string(a[j].([]byte))
|
||||
} else {
|
||||
lis[strs[j]] = a[j]
|
||||
lis[strs[j]] = a[j] //取实际类型
|
||||
}
|
||||
|
||||
}
|
||||
@@ -472,7 +472,7 @@ func (that *HoTimeDB) Select(table string, qu ...interface{}) []Map {
|
||||
//如果缓存有则从缓存取
|
||||
cacheData := that.HoTimeCache.Db(table + ":" + md5)
|
||||
|
||||
if cacheData.Data != nil {
|
||||
if cacheData != nil && cacheData.Data != nil {
|
||||
return cacheData.ToMapArray()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user