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 {