框架优化
This commit is contained in:
@@ -11,7 +11,8 @@ var TptProject = Proj{
|
||||
"hotimeCommon": Ctr{
|
||||
"info": func(that *Context) {
|
||||
hotimeName := that.RouterString[0]
|
||||
data := that.Db.Get(hotimeName, "*", Map{"id": that.Session(hotimeName + "_id").ToCeilInt()})
|
||||
fileConfig := that.MakeCodeRouter[hotimeName].FileConfig
|
||||
data := that.Db.Get(hotimeName, "*", Map{"id": that.Session(fileConfig.GetString("table") + "_id").ToCeilInt()})
|
||||
str, inData := that.MakeCodeRouter[hotimeName].Info(that.RouterString[1], data, that.Db)
|
||||
where := Map{"id": that.RouterString[2]}
|
||||
|
||||
@@ -128,7 +129,9 @@ var TptProject = Proj{
|
||||
|
||||
"search": func(that *Context) {
|
||||
hotimeName := that.RouterString[0]
|
||||
data := that.Db.Get(hotimeName, "*", Map{"id": that.Session(hotimeName + "_id").ToCeilInt()})
|
||||
fileConfig := that.MakeCodeRouter[hotimeName].FileConfig
|
||||
|
||||
data := that.Db.Get(hotimeName, "*", Map{"id": that.Session(fileConfig.GetString("table") + "_id").ToCeilInt()})
|
||||
|
||||
columnStr, leftJoin, where := that.MakeCodeRouter[hotimeName].Search(that.RouterString[1], data, that.Req, that.Db)
|
||||
|
||||
@@ -220,7 +223,7 @@ var TptProject = Proj{
|
||||
return
|
||||
}
|
||||
for k, v := range re {
|
||||
column := that.MakeCodeRouter[hotimeName].TableColumns[hotimeName][k]
|
||||
column := that.MakeCodeRouter[hotimeName].TableColumns[fileConfig.GetString("table")][k]
|
||||
if column == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user