This commit is contained in:
hoteas 2021-06-18 04:56:22 +08:00
parent 00ad6487b6
commit efb6cb980e

View File

@ -625,18 +625,18 @@ func (that *MakeCode) Search(table string, req *http.Request, db *db.HoTimeDB) (
continue continue
} }
data[table+"."+searchItemName] = reqValue
}
//树节点模式搜索 //树节点模式搜索
if req.Form["parent_id"] != nil { if searchItemName == "parent_id" {
parentID := ObjToInt(req.FormValue("parent_id")) parentID := ObjToInt(req.FormValue("parent_id"))
if parentID == 0 { if parentID == 0 {
data["OR"] = Map{table + ".parent_id[#]": 0, table + ".parent_id": nil} data["OR"] = Map{table + ".parent_id[#]": 0, table + ".parent_id": nil}
} else { } else {
data[table+".parent_id"] = parentID data[table+".parent_id"] = parentID
} }
continue
}
data[table+"."+searchItemName] = reqValue
} }