很多的改进和优化
- 文章增加日期归档
- 移除加载模糊效果
- 优化广告匹配算法
- 移除码云图床
- rss增加全局开关
- 文章支持url直接跳转
- 新增访问记录导出功能
- 图片上传转码处理优化
- 文章分类支持三级分类
- 站内搜索优化
- 广告系统支持三级分类
- 文章标签选择优化
- 广告系统管理优化
- 模板变量支持嵌套和系统变量
- 支持取消屏蔽分类
- 留言评论分类菜单性能优化
- 数据库支持mysql/postgresql/mssql/sqlite自由切换
- 请求日志记录和性能计数器支持数据库/内存/文件的方式存储
- 一些bug修正
- 一些体验优化
- 一些性能优化
数据库期初脚本:
[HttpGet("/Init"), MyAuthorize]
public ActionResult Init([FromServices] DataContext db)
{
var comments = db.Comment.Where(c => c.ParentId == 0 || c.ParentId == null).ToList();
comments.ForEach(c =>
{
c.ParentId = null;
c.GroupTag = SnowFlake.NewId;
c.Path = c.Id + "";
});
comments.Flatten().ForEach(c =>
{
c.GroupTag = c.Root().GroupTag;
c.Path = c.Path(cc => cc.Id + "", ",");
});
var msgs = db.LeaveMessage.Where(c => c.ParentId == 0 || c.ParentId == null).ToList();
msgs.ForEach(c =>
{
c.ParentId = null;
c.GroupTag = SnowFlake.NewId;
c.Path = c.Id + "";
});
msgs.Flatten().ForEach(c =>
{
c.GroupTag = c.Root().GroupTag;
c.Path = c.Path(cc => cc.Id + "", ",");
});
var categories = db.Category.Where(c => c.ParentId == 0 || c.ParentId == null).ToList();
categories.ForEach(c => c.Path = c.Id + "");
categories.Flatten().ForEach(c => c.Path = c.Path(cc => cc.Id + "", ","));
var menus = db.Menu.Where(c => c.ParentId == 0 || c.ParentId == null).ToList();
menus.ForEach(c => c.Path = c.Id + "");
menus.Flatten().ForEach(c => c.Path = c.Path(cc => cc.Id + "", ","));
db.Comment.Where(c => c.GroupTag == null).DeleteFromQuery();
db.LeaveMessage.Where(c => c.GroupTag == null).DeleteFromQuery();
return Ok(db.SaveChanges());
}