Ejemplo n.º 1
0
        /// <summary>
        /// 名家审核
        /// </summary>
        public void UpdateExperterIsShow(string userId, DealWithType dealWithType, string disposeOpinion, string image, string summary, string adeptGameCode)
        {
            var manager  = new ExperterManager();
            var entity   = manager.QueryExperterById(userId);
            var experter = manager.QueryExperterUpdateHitstroy(userId);

            if (entity == null)
            {
                throw new Exception(string.Format("修改用户:{0}信息不存在!", userId));
            }
            if (experter == null)
            {
                throw new Exception(string.Format("审核用户:{0}信息不存在!", userId));
            }

            if (dealWithType == DealWithType.HasDealWith)
            {
                //1.通过审核修改名家资料,更新审核状态
                entity.DealWithType      = dealWithType;
                entity.DisposeOpinion    = disposeOpinion;
                entity.ExperterHeadImage = image;
                entity.ExperterSummary   = summary;
                entity.AdeptGameCode     = adeptGameCode;
                manager.UpdateExperter(entity);

                experter.DealWithType   = dealWithType;
                experter.DisposeOpinion = disposeOpinion;
                manager.UpdateExperterUpdateHitstroy(experter);
            }
            if (dealWithType == DealWithType.NoneThrough)
            {
                //2.更新审核状态
                experter.DealWithType   = dealWithType;
                experter.DisposeOpinion = disposeOpinion;
                manager.UpdateExperterUpdateHitstroy(experter);
            }
        }