修复部分bug

This commit is contained in:
hoteas 2022-12-31 22:28:12 +08:00
parent 7535300107
commit 46cecc47ea
1 changed files with 10 additions and 8 deletions

18
code.go
View File

@ -22,16 +22,18 @@ var TptProject = Proj{
tableName := that.RouterString[1]
data := that.Db.Get(fileConfig.GetString("table"), "*", Map{"id": that.Session(fileConfig.GetString("table") + "_id").ToCeilInt()})
str, inData := that.MakeCodeRouter[hotimeName].Info(tableName, data, that.Db)
//str, inData := that.MakeCodeRouter[hotimeName].Info(tableName, data, that.Db)
str, _ := that.MakeCodeRouter[hotimeName].Info(tableName, data, that.Db)
where := Map{"id": that.RouterString[2]}
if len(inData) == 1 {
inData["id"] = where["id"]
where = Map{"AND": inData}
} else if len(inData) > 1 {
where["OR"] = inData
where = Map{"AND": where}
}
//权限控制,暂时取消
//if len(inData) == 1 {
// inData["id"] = where["id"]
// where = Map{"AND": inData}
//} else if len(inData) > 1 {
// where["OR"] = inData
// where = Map{"AND": where}
//}
re := that.Db.Get(tableName, str, where)