private IResult LoginRequest(IReceiveInfo receiveInfo, UserInfo userInfo)
        {
            Terminal.ClientPrint(receiveInfo.RemoteEndPoint, InfoType.请求, "登录客户端=>学号:" + receiveInfo.Message["学号"]);
            //之前的ID;
            string password   = receiveInfo.Message["密码"];
            string lastUserId = userInfo.UserId == null ? "" : userInfo.UserId;

            userInfo.UserId = receiveInfo.Message["学号"];
            IResult result;

            //判断是否已登录
            if (runningData.Clients_id.ContainsKey(userInfo.UserId))
            {
                result = new Result(baseResult.Faild, "该用户已登录");
            }
            else
            {
                Terminal.ServerPrint(InfoType.信息, "访问数据库中......");
                //验证结果
                if (ServerCallDatabase.CheckUserInfo(userInfo, password).BaseResult == baseResult.Successful)
                {
                    //是否权限用户
                    bool IsPrerogative = ServerCallDatabase.IsPrerogative(userInfo);
                    userInfo.IsPrerogative = IsPrerogative;
                    //已登录了 移除登陆
                    if (runningData.Clients_id.ContainsKey(lastUserId))
                    {
                        runningData.Clients_id.Remove(lastUserId);
                    }
                    runningData.Clients_id[userInfo.UserId] = receiveInfo.RemoteEndPoint;
                    result = new Result(baseResult.Successful, IsPrerogative.ToString());
                }
                else
                {
                    result = new Result(baseResult.Faild, "错误的账号或密码");
                }
            }

            if (result.BaseResult == baseResult.Successful)
            {
                Terminal.ServerPrint(InfoType.响应, "<" + receiveInfo.RemoteEndPoint + ">:" + "成功登录 权限:" + result.Info);
            }
            else
            {
                Terminal.ServerPrint(InfoType.响应, "<" + receiveInfo.RemoteEndPoint + ">:" + "登录失败 原因:" + result.Info);
            }
            ServerSocket.Send(receiveInfo.RemoteEndPoint, MessageTranslate.EncapsulationInfo(MessageContent.登录, MessageType.响应, result.BaseResult.ToString(), result.Info));
            return(result);
        }