From f7dfd4ec7723b7683cade6989bde31cc0a4a9b13 Mon Sep 17 00:00:00 2001 From: hoteas <等> Date: Sun, 21 Aug 2022 03:49:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=B0=E5=BD=95IP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application.go | 2 +- code/makecode.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 }