优化性能

This commit is contained in:
hoteas 2022-11-04 02:25:33 +08:00
parent 203e72f8a2
commit d6e940803d

View File

@ -546,11 +546,11 @@ var TptProject = Proj{
column := that.MakeCodeRouter[hotimeName].TableColumns[tableName][k] column := that.MakeCodeRouter[hotimeName].TableColumns[tableName][k]
if column == nil { if column == nil || column["link"] == nil && !(column["list"] == nil || column["list"] == true) {
continue continue
} }
if (column["list"] == nil || column["list"] == true) && column["name"] == "parent_id" && column.GetString("link") != "" { if column["name"] == "parent_id" {
parentC := that.Db.Get(column.GetString("link"), column.GetString("value"), Map{"id": v.GetCeilInt(k)}) parentC := that.Db.Get(column.GetString("link"), column.GetString("value"), Map{"id": v.GetCeilInt(k)})
v[column.GetString("link")+"_"+column.GetString("name")+"_"+column.GetString("value")] = "" v[column.GetString("link")+"_"+column.GetString("name")+"_"+column.GetString("value")] = ""
@ -559,8 +559,7 @@ var TptProject = Proj{
} }
} }
if column.GetString("link") != "" && if column.GetString("name") != "parent_id" {
column.GetString("name") != "parent_id" {
reStr := "" reStr := ""
if column.GetString("value") == "name" && that.MakeCodeRouter[hotimeName].TableColumns[column.GetString("link")]["nickname"] != nil { if column.GetString("value") == "name" && that.MakeCodeRouter[hotimeName].TableColumns[column.GetString("link")]["nickname"] != nil {