diff --git a/application.go b/application.go index 6caa23b..86db3b1 100644 --- a/application.go +++ b/application.go @@ -376,7 +376,7 @@ func (that *Application) handler(w http.ResponseWriter, req *http.Request) { //访问拦截true继续false暂停 connectListenerLen := len(that.connectListener) - for i := connectListenerLen - 1; i >= 0; i-- { + for i := 0; i < connectListenerLen; i++ { if that.connectListener[i](&context) { diff --git a/code/makecode.go b/code/makecode.go index 10b4020..2eb232a 100644 --- a/code/makecode.go +++ b/code/makecode.go @@ -1081,7 +1081,9 @@ func (that *MakeCode) Search(table string, userData Map, req *http.Request, db * parentID = userData.GetCeilInt(table + "_id") data["OR"] = Map{table + ".id": parentID, table + ".parent_id": nil} } else { - data[table+".parent_id"] = reqValue + + data["OR"] = Map{table + ".parent_id": reqValue, table + ".id": reqValue} + } continue }