Example #1
0
        /// <summary>
        /// 添加一条视频审核记录
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public bool AddApproveInfo(VideoApproveView info)
        {
            if (info == null)
            {
                return(false);
            }
            this._videoRepository.IncomeUpload(info.ApproveContent, info.ApproveRemark, info.VideoId, (info.Status == 4),
                                               info.CreateAdminId);
            var video = (from v in this._videoRepository.GetEntityList()
                         where v.State == false && v.Id == info.VideoId
                         select v).FirstOrDefault();

            if (video != null)
            {
                if (video.VideoState == 3)
                {
                    //TODO insert 刘强添加标签
                    try
                    {
                        this._tagsBusiness = ((Autofac.IContainer)HttpRuntime.Cache["containerKey"]).Resolve <ITagsBusiness>();
                        //上传视频的人
                        this._tagsBusiness.UserId = info.CreateAdminId;
                        this._tagsBusiness.AsyncCreateTags();
                    }
                    catch (Exception ex)
                    {
#if !DEBUG
                        LogBuilder.Log4Net.Error("更新标签失败", ex.MostInnerException());
#else
                        Console.WriteLine(LanguageUtil.Translate("api_Business_VideoApprove_AddApproveInfo_updateTagsFailed") + ex.MostInnerException().Message);
#endif
                    }
                }
                this._videoBusiness = ((Autofac.IContainer)HttpRuntime.Cache["containerKey"]).Resolve <IVideoBusiness>();
                this._videoBusiness.UpdateAVideoIndex(video);
                //审核时改变了分类
                video.CategoryId = info.CategoryId;
                this._videoRepository.UpdateEntity(video);
            }
            return(true);
        }
Example #2
0
 public VideoController(IVideoBusiness videoBusiness, IBannerVideoBusiness bannerVideoBusiness, ICategoryBusiness categoryBusiness)
 {
     this._videoBusiness       = videoBusiness;
     this._bannerVideoBusiness = bannerVideoBusiness;
     this._categoryBusiness    = categoryBusiness;
 }
Example #3
0
 public UserController(IUserBusiness userBusiness, IVideoBusiness videoBusiness)
 {
     this._userBusiness  = userBusiness;
     this._videoBusiness = videoBusiness;
 }
Example #4
0
 public VideoService(IVideoBusiness VideoBiz)
 {
     _VideoBiz = VideoBiz;
 }
Example #5
0
 public UserSpecialController(IUserSpecialBusiness userspecialbusiness, IVideoBusiness videoBusiness)
 {
     this._userspecialbusiness = userspecialbusiness;
     this._videoBusiness       = videoBusiness;
 }