Пример #1
0
        public void GenStaticPage(string keyValue)
        {
            ContentEntity moduleEntity = service.FindEntity(keyValue);

            if (moduleEntity != null)
            {
                //验证用户站点权限
                iUserRepository.VerifyUserWebsiteRole(moduleEntity.WebSiteId);
            }
            ColumnsEntity columnsEntity = GetModuleByContentID(keyValue);

            if (columnsEntity != null &&
                (columnsEntity.Type == (int)Enums.ModuleType.List || columnsEntity.Type == (int)Enums.ModuleType.AdvancedList))
            {
                if (new WebSiteApp().IsOverSizeByWebSiteId(columnsEntity.WebSiteId))
                {
                    throw new Exception("该站点空间已不足,请联系管理员!");
                }
                WebSiteApp    webSiteApp    = new WebSiteApp();
                WebSiteEntity webSiteEntity = webSiteApp.GetFormNoDel(columnsEntity.WebSiteId);
                if (webSiteEntity != null && !string.IsNullOrEmpty(webSiteEntity.Id))
                {
                    TempletApp    templetapp = new TempletApp();
                    TempletEntity templet    = templetapp.GetFormNoDel(columnsEntity.CTempletId);
                    if (templet != null)
                    {
                        new TempHelp().GenHtmlPage(keyValue, webSiteEntity, columnsEntity, templet);
                    }
                    if (new WebSiteApp().IsMobile(webSiteEntity.Id))
                    {
                        templet = templetapp.GetFormNoDel(columnsEntity.MCTempletId);
                        if (templet != null)
                        {
                            new TempHelp().GenMHtmlPage(keyValue, webSiteEntity, columnsEntity, templet);
                        }
                    }
                }
                //添加日志
                LogHelp.logHelp.WriteDbLog(true, "内容信息=>生成列表详情静态页" + columnsEntity.FullName, Enums.DbLogType.Submit, "内容管理");
            }
        }