From 8afd00ff860b108a3db34db35cec62a424e2ef41 Mon Sep 17 00:00:00 2001 From: hoteas <等> Date: Thu, 11 Aug 2022 10:41:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code.go b/code.go index 1a8ab34..d197019 100644 --- a/code.go +++ b/code.go @@ -675,11 +675,15 @@ var TptProject = Proj{ where := Map{"name": name} if that.MakeCodeRouter[hotimeName].TableColumns[fileConfig.GetString("table")]["phone"] != nil { where["phone"] = name - where = Map{"AND": Map{"OR": where, "password": Md5(password)}} + where = Map{"OR": where, "password": Md5(password)} } else { where["password"] = Md5(password) } + if len(where) > 1 { + where = Map{"AND": where} + } + user := that.Db.Get(fileConfig.GetString("table"), "*", where) if user == nil {