Beispiel #1
0
        //API SearchOutput调用
        public StlPageContents(string stlPageContentsElement, PageInfo pageInfo, ContextInfo contextInfo, int pageNum, string whereString)
        {
            _pageInfo    = pageInfo;
            _contextInfo = contextInfo;
            var xmlDocument = StlParserUtility.GetXmlDocument(stlPageContentsElement, false);

            _node = xmlDocument.DocumentElement;
            if (_node != null)
            {
                _node = _node.FirstChild;

                DisplayInfo = ContentsDisplayInfo.GetContentsDisplayInfoByXmlNode(_node, pageInfo, _contextInfo, EContextType.Content);
            }
            DisplayInfo.Scope = EScopeType.All;

            _contextInfo.TitleWordNum = DisplayInfo.TitleWordNum;

            DisplayInfo.Where += whereString;
            if (pageNum > 0)
            {
                DisplayInfo.PageNum = pageNum;
            }

            var channelId = StlDataUtility.GetNodeIdByLevel(pageInfo.PublishmentSystemId, _contextInfo.ChannelID, DisplayInfo.UpLevel, DisplayInfo.TopLevel);

            channelId = StlCacheManager.NodeId.GetNodeIdByChannelIdOrChannelIndexOrChannelName(pageInfo.PublishmentSystemId, channelId, DisplayInfo.ChannelIndex, DisplayInfo.ChannelName);

            SqlString = StlDataUtility.GetPageContentsSqlString(_pageInfo.PublishmentSystemInfo, channelId, DisplayInfo.GroupContent, DisplayInfo.GroupContentNot, DisplayInfo.Tags, DisplayInfo.IsImageExists, DisplayInfo.IsImage, DisplayInfo.IsVideoExists, DisplayInfo.IsVideo, DisplayInfo.IsFileExists, DisplayInfo.IsFile, DisplayInfo.IsNoDup, DisplayInfo.StartNum, DisplayInfo.TotalNum, DisplayInfo.OrderByString, DisplayInfo.IsTopExists, DisplayInfo.IsTop, DisplayInfo.IsRecommendExists, DisplayInfo.IsRecommend, DisplayInfo.IsHotExists, DisplayInfo.IsHot, DisplayInfo.IsColorExists, DisplayInfo.IsColor, DisplayInfo.Where, DisplayInfo.Scope, DisplayInfo.GroupChannel, DisplayInfo.GroupChannelNot);
        }
Beispiel #2
0
        public StlPageContents(string stlPageContentsElement, PageInfo pageInfo, ContextInfo contextInfo, bool isXmlContent)
        {
            _pageInfo    = pageInfo;
            _contextInfo = contextInfo;
            var xmlDocument = StlParserUtility.GetXmlDocument(stlPageContentsElement, isXmlContent);

            _node = xmlDocument.DocumentElement;
            if (_node != null)
            {
                _stlPageContentsElement = _node.InnerXml;
                _node = _node.FirstChild;

                ListInfo = ListInfo.GetListInfoByXmlNode(_node, pageInfo, _contextInfo, EContextType.Content);
            }

            _contextInfo.TitleWordNum = ListInfo.TitleWordNum;

            var channelId = StlDataUtility.GetNodeIdByLevel(pageInfo.PublishmentSystemId, _contextInfo.ChannelId, ListInfo.UpLevel, ListInfo.TopLevel);

            channelId = StlCacheManager.NodeId.GetNodeIdByChannelIdOrChannelIndexOrChannelName(pageInfo.PublishmentSystemId, channelId, ListInfo.ChannelIndex, ListInfo.ChannelName);

            SqlString = StlDataUtility.GetPageContentsSqlString(_pageInfo.PublishmentSystemInfo, channelId, ListInfo.GroupContent, ListInfo.GroupContentNot, ListInfo.Tags, ListInfo.IsImageExists, ListInfo.IsImage, ListInfo.IsVideoExists, ListInfo.IsVideo, ListInfo.IsFileExists, ListInfo.IsFile, ListInfo.IsNoDup, ListInfo.StartNum, ListInfo.TotalNum, ListInfo.OrderByString, ListInfo.IsTopExists, ListInfo.IsTop, ListInfo.IsRecommendExists, ListInfo.IsRecommend, ListInfo.IsHotExists, ListInfo.IsHot, ListInfo.IsColorExists, ListInfo.IsColor, ListInfo.Where, ListInfo.Scope, ListInfo.GroupChannel, ListInfo.GroupChannelNot);
        }