Exemplo n.º 1
0
        /// <summary>
        /// 获取视频信息
        /// </summary>
        public string GetVideo()
        {
            string content = string.Empty;

            var respData = new GetVideoRespData();

            try
            {
                string reqContent = Request["ReqContent"];
                var    reqObj     = reqContent.DeserializeJSONTo <GetVideoReqData>();

                string albumId = reqObj.special.albumId;    //活动ID

                if (string.IsNullOrEmpty(albumId))
                {
                    albumId = "3DD35B9A122F41C8A0E5D5B78D72CE65";
                }

                Loggers.Debug(new DebugLogInfo()
                {
                    Message = string.Format("GetVideo: {0}", reqContent)
                });

                //判断客户ID是否传递
                if (!string.IsNullOrEmpty(reqObj.common.customerId))
                {
                    customerId = reqObj.common.customerId;
                }
                var loggingSessionInfo = Default.GetBSLoggingSession(customerId, "1");

                var albumList = new LEventsAlbumBLL(loggingSessionInfo).QueryByEntity(new LEventsAlbumEntity {
                    AlbumId = albumId
                }, null);

                if (albumList != null && albumList.Length > 0)
                {
                    respData.content = albumList.FirstOrDefault().Description;
                }
            }
            catch (Exception ex)
            {
                respData.code        = "103";
                respData.description = "数据库操作错误";
                //respData.exception = ex.ToString();
            }
            content = respData.ToJSON();
            return(content);
        }