Exemple #1
0
        /// <summary>
        /// 是否选择我的站内信
        /// </summary>
        /// <param name="innerMailId"></param>
        /// <param name="userToken"></param>
        /// <returns></returns>
        public bool CheckIsMyInnerMail(string innerMailId, string userToken)
        {
            // 验证用户身份及权限
            var userId = GameBizAuthBusiness.ValidateUserAuthentication(userToken);

            var siteBiz = new SiteMessageControllBusiness();

            return(siteBiz.IsMyInnerMail(innerMailId, userId));
        }
Exemple #2
0
        /// <summary>
        /// 删除站内信
        /// </summary>
        public CommonActionResult DeleteInnerMail(string innerMailId, string userId)
        {
            using (var biz = new GameBiz.Business.GameBizBusinessManagement())
            {
                biz.BeginTran();

                var siteBiz = new SiteMessageControllBusiness();
                if (!siteBiz.IsMyInnerMail(innerMailId, userId))
                {
                    throw new SiteMessageException(string.Format("此站内信不属于指定用户。站内信:{0};用户:{1}。", innerMailId, userId));
                }
                siteBiz.DeleteInnerMail(innerMailId, userId);

                biz.CommitTran();
            }
            return(new CommonActionResult(true, "删除站内信完成。"));
        }
Exemple #3
0
        /// <summary>
        /// 阅读站内信
        /// </summary>
        public InnerMailInfo_Query ReadInnerMail(string innerMailId, string userToken)
        {
            // 验证用户身份及权限
            var userId = GameBizAuthBusiness.ValidateUserAuthentication(userToken);

            using (var biz = new GameBiz.Business.GameBizBusinessManagement())
            {
                biz.BeginTran();

                var siteBiz = new SiteMessageControllBusiness();
                if (!siteBiz.IsMyInnerMail(innerMailId, userId))
                {
                    throw new SiteMessageException(string.Format("此站内信不属于指定用户。站内信:{0};用户:{1}。", innerMailId, userId));
                }
                siteBiz.ReadInnerMail(innerMailId, userId);
                var info = siteBiz.QueryInnerMailDetailById(innerMailId);

                biz.CommitTran();

                return(info);
            }
        }