/// <summary>
        /// 对用户发送应用邀请
        /// </summary>
        /// <param name="userAppInviteInfo"></param>
        /// <returns></returns>
        public static int SendApplicationInvite(UserApplicationInviteInfo userAppInviteInfo)
        {
            int inviteId = Data.ManyouApplications.SendApplicationInvite(userAppInviteInfo);

            if (inviteId > 0)
            {
                int olId = OnlineUsers.GetOlidByUid(userAppInviteInfo.ToUid);
                if (olId > 0) //更新在线表信息
                {
                    OnlineUsers.UpdateNewApplicationRequest(olId, ManyouApplications.GetApplicationInviteCount(userAppInviteInfo.ToUid));
                }
            }
            return(inviteId);
        }
        /// <summary>
        /// 用户增加新应用
        /// </summary>
        /// <param name="userAppInfo"></param>
        /// <returns></returns>
        public static int AddUserApplication(UserApplicationInfo userAppInfo)
        {
            if (userAppInfo == null || userAppInfo.Uid < 1 || userAppInfo.AppId < 1)
            {
                return(-1);
            }

            int result = Data.ManyouApplications.AddUserApplication(userAppInfo);

            DeleteApplicationInviteByAppId(userAppInfo.Uid, userAppInfo.AppId);

            int olId = OnlineUsers.GetOlidByUid(userAppInfo.Uid);

            if (olId > 0) //更新在线表信息
            {
                OnlineUsers.UpdateNewApplicationRequest(olId, ManyouApplications.GetApplicationInviteCount(userAppInfo.Uid));
            }

            return(result);
        }