更新伪静态文章栏目规则,生成伪静态页面分页代码

This commit is contained in:
2020-05-26 15:15:32 +08:00
parent 4f48e1dbaa
commit 92fb899d89
20 changed files with 287 additions and 122 deletions
+3 -3
View File
@@ -5,9 +5,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NewLife.Core" Version="8.7.2020.403" />
<PackageReference Include="Senparc.Weixin" Version="6.7.401" />
<PackageReference Include="Senparc.Weixin.MP" Version="16.10.402" />
<PackageReference Include="NewLife.Core" Version="8.7.2020.501" />
<PackageReference Include="Senparc.Weixin" Version="6.7.502" />
<PackageReference Include="Senparc.Weixin.MP" Version="16.10.502" />
</ItemGroup>
<ItemGroup>
+1 -1
View File
@@ -6,7 +6,7 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="NewLife.Core" Version="8.7.2020.403" />
<PackageReference Include="NewLife.Core" Version="8.7.2020.501" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="PinYinConverterCore" Version="1.0.2" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
+10 -9
View File
@@ -43,17 +43,11 @@ namespace COMCMS.Common
pageLink = url + "?" + strQueryString;
string currPage = MyHttpContext.Current.Request.Query["page"];
string id = MyHttpContext.Current.Request.Query["id"];
if (isRewrite == 5)
{
url = $"/{filepath}/index.html";
}
if (url == "memberdownloads.aspx" && isRewrite == 2)
{
string t = MyHttpContext.Current.Request.Query["t"];
if (string.IsNullOrEmpty(t) || !Utils.IsInt(t))
t = "1";
url = string.Format("memberdownloads-{0}.aspx", t);
}
switch (isRewrite)
{
@@ -71,8 +65,15 @@ namespace COMCMS.Common
pageLink = url.Replace(".", "-{0}.");
break;
case 3:
url = url.Replace(".aspx", ".html");//避免设置错之后出现问题
pageLink = url.Replace(".", "-{0}.");
if(url.EndsWith(".html") || url.EndsWith(".aspx"))
{
url = url.Replace(".aspx", ".html");//避免设置错之后出现问题
pageLink = url.Replace(".", "-{0}.");
}
else
{
pageLink = url + "?page={0}";
}
break;
case 5:
pageLink = url.Replace(".", "-{0}.");
+1 -1
View File
@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NewLife.XCode" Version="9.16.2020.403" />
<PackageReference Include="NewLife.XCode" Version="9.17.2020.501" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
@@ -69,29 +69,28 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers
tip.Message = "文章栏目标题不能为空!";
return Json(tip);
}
if (string.IsNullOrEmpty(model.FilePath))
if (!string.IsNullOrEmpty(model.FilePath))
{
tip.Message = "文章栏目路径不能为空!";
return Json(tip);
if (!model.FilePath.StartsWith("/"))
{
tip.Message = "栏目路径请以/开头!";
return Json(tip);
}
if (model.FilePath.EndsWith("/"))
{
tip.Message = "栏目路径结尾不用加上/";
return Json(tip);
}
if (model.FilePath.Count(x => x == '/') > 4)
{
tip.Message = "最多只能四级路径!";
return Json(tip);
}
}
if (!model.FilePath.StartsWith("/"))
{
tip.Message = "栏目路径请以/开头!";
return Json(tip);
}
if (model.FilePath.EndsWith("/"))
{
tip.Message = "栏目路径结尾不用加上/";
return Json(tip);
}
if (model.FilePath.Count(x => x == '/') > 4)
{
tip.Message = "最多只能四级路径!";
return Json(tip);
}
if (!AdminUtils.CheckFilePathIsOK(model.FilePath, 0, 0))
if (!string.IsNullOrEmpty(model.FilePath) && !AdminUtils.CheckFilePathIsOK(model.FilePath, 0, 0))
{
tip.Message = "栏目路径不可用,请重新填写!";
return Json(tip);
@@ -163,27 +162,29 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers
Json(tip);
}
if (string.IsNullOrEmpty(model.FilePath))
if (!string.IsNullOrEmpty(model.FilePath))
{
tip.Message = "文章栏目路径不能为空!";
return Json(tip);
if (!model.FilePath.StartsWith("/"))
{
tip.Message = "栏目路径请以/开头!";
return Json(tip);
}
if (model.FilePath.EndsWith("/"))
{
tip.Message = "栏目路径结尾不用加上/";
return Json(tip);
}
if (model.FilePath.Count(x => x == '/') > 4)
{
tip.Message = "最多只能四级路径!";
return Json(tip);
}
}
if (!model.FilePath.StartsWith("/"))
{
tip.Message = "栏目路径请以/开头!";
return Json(tip);
}
if (model.FilePath.EndsWith("/"))
{
tip.Message = "栏目路径结尾不用加上/";
return Json(tip);
}
if (model.FilePath.Count(x => x == '/') > 4)
{
tip.Message = "最多只能四级路径!";
return Json(tip);
}
if (!AdminUtils.CheckFilePathIsOK(model.FilePath, entity.Id, 0))
if (!string.IsNullOrEmpty(model.FilePath) && !AdminUtils.CheckFilePathIsOK(model.FilePath, entity.Id, 0))
{
tip.Message = "栏目路径不可用,请重新填写!";
return Json(tip);
@@ -16,13 +16,24 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers
public class ServerController : AdminBaseController
{
#region 中文转拼音
public IActionResult Hanzi2Pinyin(string name)
[HttpPost]
public IActionResult Hanzi2Pinyin(string name,int pid=0,string t="")
{
string pinyin = "";
string pinyin = "/";
if(t == "articlecategory" && pid>0)
{
ArticleCategory pcategory = ArticleCategory.FindById(pid);
if(pcategory !=null && !string.IsNullOrEmpty(pcategory.FilePath))
{
pinyin = pcategory.FilePath+"/";
}
}
if (!string.IsNullOrEmpty(name))
{
pinyin = PinYinHelper.GetPinyin(name).ToLower().Replace(" ","-");
pinyin += PinYinHelper.GetPinyin(name).ToLower().Replace(" ","-");
}
tip.Status = JsonTip.SUCCESS;
tip.Message = pinyin;
return Json(tip);
@@ -25,7 +25,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label text-danger">文章标题:</label>
<label class="col-sm-3 control-label">文章标题:</label>
<div class="col-sm-8">
<input id="Title" name="Title" maxlength="200" type="text" class="form-control" required aria-required="true" placeholder="填写文章标题">
</div>
@@ -33,7 +33,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">静态化文件名:</label>
<div class="col-sm-8">
<input id="FileName" name="FileName" maxlength="200" type="text" class="form-control" required aria-required="true" placeholder="填写静态化文件名,大小写字母、数字和-,如:about.html,不能是index.html" value="">
<input id="FileName" name="FileName" maxlength="200" type="text" class="form-control" aria-required="true" placeholder="填写静态化文件名,大小写字母、数字和-,如:about.html,不能是index.html" value="">
</div>
</div>
<div class="form-group">
@@ -34,7 +34,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">栏目路径:</label>
<div class="col-sm-8">
<input id="FilePath" name="FilePath" maxlength="100" type="text" class="form-control" required aria-required="true" placeholder="填写栏目路径,SEO优化使用,最多支持4级目录,可以输入字母、数字和-">
<input id="FilePath" name="FilePath" maxlength="100" type="text" class="form-control" aria-required="true" placeholder="填写栏目路径,SEO优化使用,最多支持4级目录,可以输入字母、数字和-">
</div>
</div>
<div class="form-group">
@@ -163,11 +163,12 @@
function aoutoTransform() {
var title = $("#KindName").val();
var filePath = $("#FilePath").val();
var pid = $("#PId").val();
if (!filePath) {
$.ajax({
type: "POST",
url: "/AdminCP/Server/Hanzi2Pinyin",
data: { name: title},
url: "/AdminCP/Server/Hanzi2Pinyin",
data: { name: title, pid: pid,t:"articlecategory" },
dataType: "JSON",
success: function (data) {
if (data.status == "success") {
@@ -32,7 +32,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">静态化文件名:</label>
<div class="col-sm-8">
<input id="FileName" name="FileName" maxlength="200" type="text" class="form-control" required aria-required="true" placeholder="填写静态化文件名,大小写字母、数字和-,如:about.html,不能是index.html" value="@Model.FileName">
<input id="FileName" name="FileName" maxlength="200" type="text" class="form-control" aria-required="true" placeholder="填写静态化文件名,大小写字母、数字和-,如:about.html,不能是index.html" value="@Model.FileName">
</div>
</div>
<div class="form-group">
@@ -34,7 +34,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">栏目路径:</label>
<div class="col-sm-8">
<input id="FilePath" name="FilePath" maxlength="100" type="text" class="form-control" required aria-required="true" value="@Model.FilePath" placeholder="填写栏目路径,SEO优化使用,最多支持4级目录,可以输入字母、数字和-">
<input id="FilePath" name="FilePath" maxlength="100" type="text" class="form-control" aria-required="true" value="@Model.FilePath" placeholder="填写栏目路径,SEO优化使用,最多支持4级目录,可以输入字母、数字和-">
</div>
</div>
<div class="form-group">
@@ -168,25 +168,26 @@
function aoutoTransform() {
var title = $("#KindName").val();
var filePath = $("#FilePath").val();
var pid = $("#PId").val();
if (!filePath) {
$.ajax({
type: "POST",
url: "/AdminCP/Server/Hanzi2Pinyin",
data: { name: title},
dataType: "JSON",
success: function (data) {
if (data.status == "success") {
if (data.message) {
$("#FilePath").val(data.message);
type: "POST",
url: "/AdminCP/Server/Hanzi2Pinyin",
data: { name: title, pid: pid, t: "articlecategory" },
dataType: "JSON",
success: function (data) {
if (data.status == "success") {
if (data.message) {
$("#FilePath").val(data.message);
}
} else {
layer.alert(data.message, { icon: 2 });
}
} else {
layer.alert(data.message, { icon: 2 });
},
error: function () {
layer.alert('执行错误,请联系管理员!', { icon: 2 });
}
},
error: function () {
layer.alert('执行错误,请联系管理员!', { icon: 2 });
}
});
});
}
}
</script>
@@ -38,13 +38,13 @@
<script src="~/js/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>
</environment>
<environment names="Staging,Production">
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"
<script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
asp-fallback-test="window.jQuery"
crossorigin="anonymous"
integrity="sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk">
</script>
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
crossorigin="anonymous"
+4 -4
View File
@@ -6,9 +6,9 @@
<ItemGroup>
<PackageReference Include="MailKit" Version="2.6.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.3" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.2" />
<PackageReference Include="MimeKit" Version="2.6.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.4" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.3" />
<PackageReference Include="MimeKit" Version="2.7.0" />
<PackageReference Include="MySql.Data" Version="8.0.20" />
<PackageReference Include="NewLife.XCode" Version="9.17.2020.501" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
@@ -16,7 +16,7 @@
<PackageReference Include="Senparc.Weixin" Version="6.7.502" />
<PackageReference Include="Senparc.Weixin.MP" Version="16.10.502" />
<PackageReference Include="Senparc.Weixin.MP.MvcExtension" Version="4.1.1" />
<PackageReference Include="Senparc.Weixin.TenPay" Version="1.5.502" />
<PackageReference Include="Senparc.Weixin.TenPay" Version="1.5.502.1" />
<PackageReference Include="Senparc.Weixin.WxOpen" Version="3.8.502" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.1" />
<PackageReference Include="ZKWeb.System.Drawing" Version="4.0.1" />
+18 -1
View File
@@ -95,6 +95,14 @@ namespace COMCMS.Web.Common
Category pc = Category.FindById(id);
url = EchoURL(pc);
break;
case Utils.CMSType.Article:
Article a = Article.FindById(id);
url = EchoURL(a);
break;
case Utils.CMSType.Product:
Product p = Product.FindById(id);
url = EchoURL(p);
break;
default:
url= "/";
break;
@@ -126,7 +134,16 @@ namespace COMCMS.Web.Common
}
else
return $"/article/detail/{model.Id}";
}
/// <summary>
/// 生成文章详情地址
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public static string EchoArticleURL(int id)
{
Article model = Article.FindById(id);
return EchoArticleURL(model);
}
#endregion
+2 -2
View File
@@ -88,9 +88,9 @@
<li>暂无相关记录...</li>
}
</ul>
<!-- 分页按钮 -->
<!-- 分页按钮 $"/Article/Index/{Model.Id}" + "?page={0}"-->
<div class="normal">
@Html.Raw(Pages.GetPageStr(ViewBag.pagesize, (int)ViewBag.totalCount, ViewBag.page, $"/Article/Index/{Model.Id}" + "?page={0}", 99, 10, ""))
@Html.Raw(Pages.GetPageStr(ViewBag.pagesize, (int)ViewBag.totalCount, ViewBag.page, ViewsHelper.EchoURL(Model), 3, 10, ""))
</div>
<!-- 点击加载更多 -->
</div>
+3 -3
View File
@@ -30,7 +30,7 @@
@foreach (var item in productCategories)
{
<url>
<loc>@(url)@(ViewsHelper.EchoURL(item)))</loc>
<loc>@(url)@(ViewsHelper.EchoURL(item))</loc>
<priority>0.80</priority>
<lastmod>@(lastmod)</lastmod>
<changefreq>daily</changefreq>
@@ -39,7 +39,7 @@
@foreach (var item in articles)
{
<url>
<loc>@(url)@(ViewsHelper.EchoURL(item)))</loc>
<loc>@(url)@(ViewsHelper.EchoURL(item))</loc>
<priority>0.80</priority>
<lastmod>@(lastmod)</lastmod>
<changefreq>daily</changefreq>
@@ -48,7 +48,7 @@
@foreach (var item in products)
{
<url>
<loc>@(url)@(ViewsHelper.EchoURL(item)))</loc>
<loc>@(url)@(ViewsHelper.EchoURL(item))</loc>
<priority>0.80</priority>
<lastmod>@(lastmod)</lastmod>
<changefreq>daily</changefreq>
+2 -2
View File
@@ -13,11 +13,11 @@
"SignSalt": "comcms"
},
"connectionStrings": {
"mssqlconnon": {
"dbconn": {
"connectionString": "Server=.;Port=3306;Database=comcms;Uid=root;Pwd=root;SslMode=None;charset=utf8mb4",
"providerName": "MySql.Data.MySqlClient"
},
"dbconn": {
"mssqlconnon": {
"connectionString": "server=.;database=comcmscore;uid=sa;pwd=123456",
"providerName": "System.Data.SqlClient"
}
@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="3.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="3.1.4" />
</ItemGroup>
</Project>
+156 -23
View File
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Tables xmlns="http://www.newlifex.com/Model2020.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://www.newlifex.com http://www.newlifex.com/Model2020.xsd" Version="9.6.6663.16294" NameSpace="XCode.Membership" ConnName="Membership" Output="" BaseClass="Entity" ChineseFileName="True" IgnoreNameCase="True">
<Table Name="User" Description="用户" DbType="SqlServer" RenderGenEntity="True">
<Tables Version="9.16.7426.38239" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://www.newlifex.com http://www.newlifex.com/Model2020.xsd" NameSpace="XCode.Membership" ConnName="Membership" Output="" BaseClass="Entity" ChineseFileName="True" IgnoreNameCase="True" xmlns="http://www.newlifex.com/Model2020.xsd">
<Table Name="User" Description="用户">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="Name" DataType="String" Master="True" Nullable="False" Description="名称。登录用户名" />
<Column Name="Password" DataType="String" Description="密码" />
<Column Name="DisplayName" DataType="String" Description="昵称" />
<Column Name="Sex" DataType="Int32" Description="性别。未知、男、女" Type="SexKinds" />
<Column Name="Mail" DataType="String" Description="邮件" />
<Column Name="Mobile" DataType="String" Description="手机" />
<Column Name="Mail" DataType="String" ItemType="mail" Description="邮件" />
<Column Name="Mobile" DataType="String" ItemType="mobile" Description="手机" />
<Column Name="Code" DataType="String" Description="代码。身份证、员工编号等" />
<Column Name="Avatar" DataType="String" Length="200" Description="头像" />
<Column Name="Avatar" DataType="String" ItemType="image" Length="200" Description="头像" />
<Column Name="RoleID" DataType="Int32" Description="角色。主要角色" />
<Column Name="RoleIDs" DataType="String" Length="200" Description="角色组。次要角色集合" />
<Column Name="DepartmentID" DataType="Int32" Description="部门。组织机构" />
<Column Name="Online" DataType="Boolean" Description="在线" />
<Column Name="Enable" DataType="Boolean" Description="启用" />
<Column Name="Logins" DataType="Int32" Description="登录次数" />
@@ -20,31 +21,87 @@
<Column Name="LastLoginIP" DataType="String" Description="最后登录IP" />
<Column Name="RegisterTime" DataType="DateTime" Description="注册时间" />
<Column Name="RegisterIP" DataType="String" Description="注册IP" />
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
<Column Name="Ex3" DataType="Double" Description="扩展3" />
<Column Name="Ex4" DataType="String" Description="扩展4" />
<Column Name="Ex5" DataType="String" Description="扩展5" />
<Column Name="Ex6" DataType="String" Description="扩展6" Attribute="XmlIgnore, ScriptIgnore, IgnoreDataMember" />
<Column Name="UpdateUser" DataType="String" Description="更新者" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
</Columns>
<Indexes>
<Index Columns="Name" Unique="True" />
<Index Columns="RoleID" />
<Index Columns="UpdateTime" />
</Indexes>
</Table>
<Table Name="Role" Description="角色" RenderGenEntity="True">
<Table Name="Department" Description="部门。组织机构,多级树状结构">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="Code" DataType="String" Description="代码" />
<Column Name="Name" DataType="String" Master="True" Nullable="False" Description="名称" />
<Column Name="FullName" DataType="String" Length="200" Description="全名" />
<Column Name="ParentID" DataType="Int32" Description="父级" />
<Column Name="Level" DataType="Int32" Description="层级。树状结构的层级" />
<Column Name="Sort" DataType="Int32" Description="排序。同级内排序" />
<Column Name="Enable" DataType="Boolean" Description="启用" />
<Column Name="Visible" DataType="Boolean" Description="可见" />
<Column Name="ManagerID" DataType="Int32" Description="管理者" />
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
<Column Name="Ex3" DataType="Double" Description="扩展3" />
<Column Name="Ex4" DataType="String" Description="扩展4" />
<Column Name="Ex5" DataType="String" Description="扩展5" />
<Column Name="Ex6" DataType="String" Description="扩展6" />
<Column Name="CreateUser" DataType="String" Description="创建者" />
<Column Name="CreateUserID" DataType="Int32" Description="创建用户" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
<Column Name="UpdateUser" DataType="String" Description="更新者" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
</Columns>
<Indexes>
<Index Columns="Name" />
<Index Columns="ParentID,Name" Unique="True" />
<Index Columns="Code" />
<Index Columns="UpdateTime" />
</Indexes>
</Table>
<Table Name="Role" Description="角色">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="Name" DataType="String" Master="True" Nullable="False" Description="名称" />
<Column Name="Enable" DataType="Boolean" Description="启用" />
<Column Name="IsSystem" DataType="Boolean" Description="系统。用于业务系统开发使用,不受数据权限约束,禁止修改名称或删除" />
<Column Name="Remark" DataType="String" Description="说明" />
<Column Name="Permission" DataType="String" Length="500" Description="权限。对不同资源的权限,逗号分隔,每个资源的权限子项竖线分隔" />
<Column Name="Permission" DataType="String" Length="-1" Description="权限。对不同资源的权限,逗号分隔,每个资源的权限子项竖线分隔" />
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
<Column Name="Ex3" DataType="Double" Description="扩展3" />
<Column Name="Ex4" DataType="String" Description="扩展4" />
<Column Name="Ex5" DataType="String" Description="扩展5" />
<Column Name="Ex6" DataType="String" Description="扩展6" />
<Column Name="CreateUser" DataType="String" Description="创建者" />
<Column Name="CreateUserID" DataType="Int32" Description="创建用户" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
<Column Name="UpdateUser" DataType="String" Description="更新者" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
</Columns>
<Indexes>
<Index Columns="Name" Unique="True" />
</Indexes>
</Table>
<Table Name="Menu" Description="菜单" BaseType="EntityTree" RenderGenEntity="True">
<Table Name="Menu" Description="菜单" BaseType="EntityTree">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="Name" DataType="String" Master="True" Nullable="False" Description="名称" />
@@ -57,6 +114,20 @@
<Column Name="Visible" DataType="Boolean" Description="可见" />
<Column Name="Necessary" DataType="Boolean" Description="必要。必要的菜单,必须至少有角色拥有这些权限,如果没有则自动授权给系统角色" />
<Column Name="Permission" DataType="String" Length="200" Description="权限子项。逗号分隔,每个权限子项名值竖线分隔" />
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
<Column Name="Ex3" DataType="Double" Description="扩展3" />
<Column Name="Ex4" DataType="String" Description="扩展4" />
<Column Name="Ex5" DataType="String" Description="扩展5" />
<Column Name="Ex6" DataType="String" Description="扩展6" />
<Column Name="CreateUser" DataType="String" Description="创建者" />
<Column Name="CreateUserID" DataType="Int32" Description="创建用户" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
<Column Name="UpdateUser" DataType="String" Description="更新者" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
</Columns>
<Indexes>
@@ -64,21 +135,83 @@
<Index Columns="ParentID,Name" Unique="True" />
</Indexes>
</Table>
<Table Name="Log" Description="日志" ConnName="Log" RenderGenEntity="True">
<Table Name="Parameter" Description="字典参数">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="UserID" DataType="Int32" Description="用户。按用户区分参数,用户0表示系统级" />
<Column Name="Category" DataType="String" Description="类别" />
<Column Name="Name" DataType="String" Master="True" Description="名称" />
<Column Name="Value" DataType="String" Length="200" Description="数值" />
<Column Name="LongValue" DataType="String" Length="2000" Description="长数值" />
<Column Name="Kind" DataType="Int32" Description="种类。0普通,21列表,22名值" Type="XCode.Membership.ParameterKinds" />
<Column Name="Enable" DataType="Boolean" Description="启用" />
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
<Column Name="Ex3" DataType="Double" Description="扩展3" />
<Column Name="Ex4" DataType="String" Description="扩展4" />
<Column Name="Ex5" DataType="String" Description="扩展5" />
<Column Name="Ex6" DataType="String" Description="扩展6" />
<Column Name="CreateUser" DataType="String" Description="创建者" />
<Column Name="CreateUserID" DataType="Int32" Description="创建用户" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
<Column Name="UpdateUser" DataType="String" Description="更新者" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
</Columns>
<Indexes>
<Index Columns="UserID,Category,Name" Unique="True" />
<Index Columns="Category,Name" />
<Index Columns="UpdateTime" />
</Indexes>
</Table>
<Table Name="Area" Description="地区。行政区划数据">
<Columns>
<Column Name="ID" DataType="Int32" PrimaryKey="True" Description="编码。行政区划编码" />
<Column Name="Name" DataType="String" Master="True" Description="名称" />
<Column Name="FullName" DataType="String" Master="True" Description="全名" />
<Column Name="ParentID" DataType="Int32" Description="父级" />
<Column Name="Level" DataType="Int32" Description="层级" />
<Column Name="Longitude" DataType="Double" Description="经度" />
<Column Name="Latitude" DataType="Double" Description="纬度" />
<Column Name="Enable" DataType="Boolean" Description="启用" />
<Column Name="UpdateUser" DataType="String" Description="更新者" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新用户" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="Remark" DataType="String" Length="200" Description="备注" />
</Columns>
<Indexes>
<Index Columns="ParentID" />
<Index Columns="Name" />
<Index Columns="UpdateTime,ID" />
</Indexes>
</Table>
<Table Name="Log" Description="日志" ConnName="Log">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="Category" DataType="String" Description="类别" />
<Column Name="Action" DataType="String" Description="操作" />
<Column Name="LinkID" DataType="Int32" Description="链接" />
<Column Name="Success" DataType="Boolean" Description="成功" />
<Column Name="UserName" DataType="String" Description="用户名" />
<Column Name="CreateUserID" DataType="Int32" Description="用户编号" />
<Column Name="CreateIP" DataType="String" Description="IP地址" />
<Column Name="CreateTime" DataType="DateTime" Description="时间" />
<Column Name="Ex1" DataType="Int32" Description="扩展1" />
<Column Name="Ex2" DataType="Int32" Description="扩展2" />
<Column Name="Ex3" DataType="Double" Description="扩展3" />
<Column Name="Ex4" DataType="String" Description="扩展4" />
<Column Name="Ex5" DataType="String" Description="扩展5" />
<Column Name="Ex6" DataType="String" Description="扩展6" />
<Column Name="CreateUser" DataType="String" Description="创建者" />
<Column Name="CreateUserID" DataType="Int32" Description="创建用户" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="时间" />
<Column Name="Remark" DataType="String" Length="500" Description="详细信息" />
</Columns>
<Indexes>
<Index Columns="Category" />
<Index Columns="CreateUserID" />
<Index Columns="Action,Category,CreateTime" />
<Index Columns="CreateUserID,CreateTime" />
<Index Columns="CreateTime" />
</Indexes>
</Table>
@@ -93,8 +226,8 @@
<Column Name="Status" DataType="String" Length="200" Description="状态" />
<Column Name="OnlineTime" DataType="Int32" Description="在线时间。本次在线总时间,秒" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="UpdateTime" DataType="DateTime" Description="修改时间" />
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="修改时间" />
</Columns>
<Indexes>
<Index Columns="UserID" />
@@ -115,9 +248,9 @@
<Column Name="Error" DataType="Int32" Description="错误" />
<Column Name="Cost" DataType="Int32" Description="耗时。毫秒" />
<Column Name="MaxCost" DataType="Int32" Description="最大耗时。毫秒" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="Remark" DataType="String" Length="500" Description="详细信息" />
<Column Name="CreateTime" DataType="DateTime" Nullable="False" Description="创建时间" />
<Column Name="UpdateTime" DataType="DateTime" Nullable="False" Description="更新时间" />
<Column Name="Remark" DataType="String" Length="5000" Description="详细信息" />
</Columns>
<Indexes>
<Index Columns="Page,Level,Time" Unique="True" />
+4 -4
View File
@@ -31,8 +31,8 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="NewLife.Core, Version=8.7.7398.1900, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.Core.8.7.2020.403\lib\net46\NewLife.Core.dll</HintPath>
<Reference Include="NewLife.Core, Version=8.7.7426.39090, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.Core.8.7.2020.501\lib\net46\NewLife.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -48,8 +48,8 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="XCode, Version=9.16.7398.1901, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.XCode.9.16.2020.403\lib\net45\XCode.dll</HintPath>
<Reference Include="XCode, Version=9.16.7426.39093, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.XCode.9.17.2020.501\lib\net45\XCode.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NewLife.Core" version="8.7.2020.403" targetFramework="net461" />
<package id="NewLife.XCode" version="9.16.2020.403" targetFramework="net461" />
<package id="NewLife.Core" version="8.7.2020.501" targetFramework="net461" />
<package id="NewLife.XCode" version="9.17.2020.501" targetFramework="net461" />
</packages>