Skip to content

Commit

Permalink
😍解决种子数据中menu有重复的key值
Browse files Browse the repository at this point in the history
  • Loading branch information
zuohuaijun committed May 11, 2021
1 parent 4250165 commit 1f934b5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions backend/Admin.NET.Core/SeedData/SysMenuSeedData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public IEnumerable<SysMenu> HasData(DbContext dbContext, Type dbContextLocator)
new SysMenu{Id=142307070914667, Pid=142307070914663, Pids="[0],[142307070914662],[142307070914663],", Name="配置编辑", Code="system_tools_config_edit", Type=MenuType.BTN, Permission="sysConfig:edit", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
new SysMenu{Id=142307070914668, Pid=142307070914663, Pids="[0],[142307070914662],[142307070914663],", Name="配置删除", Code="system_tools_config_delete", Type=MenuType.BTN, Permission="sysConfig:delete", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
new SysMenu{Id=142307070914669, Pid=142307070914663, Pids="[0],[142307070914662],[142307070914663],", Name="配置详情", Code="system_tools_config_detail", Type=MenuType.BTN, Permission="sysConfig:detail", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
new SysMenu{Id=142307070914670, Pid=142307070914663, Pids="[0],[142307070914662],[142307070914663],", Name="设为默认应用", Code="sys_app_mgr_set_as_default", Type=MenuType.BTN, Permission="sysApp:setAsDefault", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
new SysMenu{Id=142307070914671, Pid=142307070914662, Pids="[0],[142307070914662],", Name="邮件发送", Code="sys_email_mgr", Type=MenuType.MENU, Router="/email", Component="system/email/index", Application="system", OpenType=MenuOpenType.COMPONENT, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE},
new SysMenu{Id=142307070914672, Pid=142307070914671, Pids="[0],[142307070914662],[142307070914671],", Name="发送文本邮件", Code="sys_email_mgr_send_email", Type=MenuType.BTN, Permission="email:sendEmail", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
new SysMenu{Id=142307070914673, Pid=142307070914671, Pids="[0],[142307070914662],[142307070914671],", Name="发送html邮件", Code="sys_email_mgr_send_email_html", Type=MenuType.BTN, Permission="email:sendEmailHtml", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
Expand All @@ -117,7 +116,7 @@ public IEnumerable<SysMenu> HasData(DbContext dbContext, Type dbContextLocator)
new SysMenu{Id=142307070918726, Pid=142307070914678, Pids="[0],[142307070914662],[142307070914678],", Name="字典值增加", Code="sys_dict_mgr_dict_add", Type=MenuType.BTN, Permission="sysDictData:add", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
new SysMenu{Id=142307070918727, Pid=142307070914678, Pids="[0],[142307070914662],[142307070914678],", Name="字典值删除", Code="sys_dict_mgr_dict_delete", Type=MenuType.BTN, Permission="sysDictData:delete", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
new SysMenu{Id=142307070918728, Pid=142307070914678, Pids="[0],[142307070914662],[142307070914678],", Name="字典值编辑", Code="sys_dict_mgr_dict_edit", Type=MenuType.BTN, Permission="sysDictData:edit", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
new SysMenu{Id=142307070918729, Pid=142307070914678, Pids="[0],[142307070914662],[142307070914678],", Name="字典值详情", Code="sys_role_mgr_grant_data", Type=MenuType.BTN, Permission="sysDictData:detail", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
new SysMenu{Id=142307070918729, Pid=142307070914678, Pids="[0],[142307070914662],[142307070914678],", Name="字典值详情", Code="sys_dict_mgr_dict_detail", Type=MenuType.BTN, Permission="sysDictData:detail", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
new SysMenu{Id=142307070918730, Pid=142307070914678, Pids="[0],[142307070914662],[142307070914678],", Name="字典值修改状态", Code="sys_dict_mgr_dict_change_status", Type=MenuType.BTN, Permission="sysDictData:changeStatus", Application="system", OpenType=MenuOpenType.NONE, Visible="Y", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE },
new SysMenu{Id=142307070918731, Pid=142307070914662, Pids="[0],[142307070914662],", Name="接口文档", Code="sys_swagger_mgr", Type=MenuType.MENU, Router="/swagger", Component="Iframe", Application="system", OpenType=MenuOpenType.INNER, Visible="Y", Link="http://localhost:5566/", Weight=MenuWeight.SUPER_ADMIN_WEIGHT, Sort=100, Status=CommonStatus.ENABLE},

Expand Down
3 changes: 0 additions & 3 deletions backend/Admin.NET.Web.Entry/Admin.NET.Web.Entry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
</ItemGroup>

<ItemGroup>
<None Update="Admin.NET.db">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Admin.NET_SaaS.db">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
Binary file modified backend/Admin.NET.Web.Entry/Admin.NET.db
Binary file not shown.
8 changes: 4 additions & 4 deletions backend/Admin.NET.Web.Entry/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
{
"Name": "Console",
"Args": {
"outputTemplate": "【时间】{Timestamp:yyyy-MM-dd HH:mm:ss,fff}{NewLine}【等级】{Level:u3}{NewLine}【消息】{Message:lj}{NewLine}{NewLine}"
"outputTemplate": "【时间】{Timestamp:yyyy-MM-dd HH:mm:ss,fff}{NewLine}【等级】{Level:u3}{NewLine}【消息】{Message:lj}{NewLine}{NewLine}"
}
},
{
"Name": "File",
"Args": {
"path": "logs/.log",
"rollingInterval": "Day",
"outputTemplate": "【时间】{Timestamp:yyyy-MM-dd HH:mm:ss,fff}{NewLine}【等级】{Level:u3}{NewLine}【消息】{Message:lj}{NewLine}{NewLine}"
"outputTemplate": "【时间】{Timestamp:yyyy-MM-dd HH:mm:ss,fff}{NewLine}【等级】{Level:u3}{NewLine}【消息】{Message:lj}{NewLine}{NewLine}"
}
}
]
},
"AllowedHosts": "*",
"AppSettings": {
"EnabledReferenceAssemblyScan": true, // 启用模块化程序集扫描
"ExternalAssemblies": [ "plugins/Covid19.Plugin" ] //动态加载 dll
"EnabledReferenceAssemblyScan": true, // 启用模块化程序集扫描
"ExternalAssemblies": [ "plugins/Covid19.Plugin" ] //动态加载 dll
}
}

0 comments on commit 1f934b5

Please sign in to comment.