优化
This commit is contained in:
parent
00ad6487b6
commit
efb6cb980e
@ -625,18 +625,18 @@ func (that *MakeCode) Search(table string, req *http.Request, db *db.HoTimeDB) (
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
data[table+"."+searchItemName] = reqValue
|
||||
}
|
||||
|
||||
//树节点模式搜索
|
||||
if req.Form["parent_id"] != nil {
|
||||
if searchItemName == "parent_id" {
|
||||
parentID := ObjToInt(req.FormValue("parent_id"))
|
||||
if parentID == 0 {
|
||||
data["OR"] = Map{table + ".parent_id[#]": 0, table + ".parent_id": nil}
|
||||
} else {
|
||||
data[table+".parent_id"] = parentID
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
data[table+"."+searchItemName] = reqValue
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user