ソースを参照

精简了数据表contact

懒得勤快 6 年 前
コミット
5facbb0723
27 ファイル変更175 行追加1767 行削除
  1. 0 21
      src/Masuit.MyBlogs.Core/App_Data/rewrite.xml
  2. 0 121
      src/Masuit.MyBlogs.Core/Common/RegisterAutomapper.cs
  3. 0 7
      src/Masuit.MyBlogs.Core/Configs/RegisterAutomapper.cs
  4. 1 7
      src/Masuit.MyBlogs.Core/Controllers/BaseController.cs
  5. 0 77
      src/Masuit.MyBlogs.Core/Controllers/ContactController.cs
  6. 0 3
      src/Masuit.MyBlogs.Core/Infrastructure/Application/DataContext.cs
  7. 0 2
      src/Masuit.MyBlogs.Core/Infrastructure/Repository/Interface/IBaseRepository.cs
  8. 0 6
      src/Masuit.MyBlogs.Core/Infrastructure/Repository/Repositories.cs
  9. 0 2
      src/Masuit.MyBlogs.Core/Infrastructure/Services/Interface/IServices.cs
  10. 0 7
      src/Masuit.MyBlogs.Core/Infrastructure/Services/Services.cs
  11. 13 8
      src/Masuit.MyBlogs.Core/Masuit.MyBlogs.Core.csproj
  12. 137 16
      src/Masuit.MyBlogs.Core/Masuit.MyBlogs.Core.xml
  13. 0 705
      src/Masuit.MyBlogs.Core/Migrations/20190126133804_Init.Designer.cs
  14. 0 433
      src/Masuit.MyBlogs.Core/Migrations/20190126133804_Init.cs
  15. 0 29
      src/Masuit.MyBlogs.Core/Models/DTO/ContactsInputDto.cs
  16. 0 18
      src/Masuit.MyBlogs.Core/Models/DTO/ContactsOutputDto.cs
  17. 0 31
      src/Masuit.MyBlogs.Core/Models/Entity/Contacts.cs
  18. 0 23
      src/Masuit.MyBlogs.Core/Models/RequestModel/PageFilter.cs
  19. 0 4
      src/Masuit.MyBlogs.Core/Models/ViewModel/PageFootViewModel.cs
  20. 20 30
      src/Masuit.MyBlogs.Core/Views/Misc/About.cshtml
  21. 0 10
      src/Masuit.MyBlogs.Core/Views/Shared/_Layout.cshtml
  22. 0 9
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/app/route.config.js
  23. 0 139
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/contact.js
  24. 0 0
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/contact.min.js
  25. 2 1
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/post.js
  26. 2 9
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/template/sidebar-left.html
  27. 0 49
      src/Masuit.MyBlogs.Core/wwwroot/ng-views/views/contact.html

+ 0 - 21
src/Masuit.MyBlogs.Core/App_Data/rewrite.xml

@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<rewrite>
-    <rules>
-        <rule name="重定向到https" enabled="true" stopProcessing="true">
-            <match url="(.*)" />
-            <conditions>
-                <add input="{HTTPS}" pattern="^OFF$" />
-                <add input="{HTTPS_HOST}" pattern="^(localhost)" negate="true" />
-            </conditions>
-            <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
-        </rule>
-        <rule name="强制重定向到顶级域名" enabled="true" stopProcessing="true">
-            <match url="(.*)" />
-            <conditions logicalGrouping="MatchAny">
-                <add input="{HTTP_HOST}" pattern="^.+\.(.+\..+)$" />
-            </conditions>
-            <action type="Redirect" url="https://{C:1}/{R:1}" appendQueryString="true" redirectType="Permanent" />
-        </rule>
-    </rules>
-</rewrite>

+ 0 - 121
src/Masuit.MyBlogs.Core/Common/RegisterAutomapper.cs

@@ -1,121 +0,0 @@
-using AutoMapper;
-using Masuit.MyBlogs.Core.Models.DTO;
-using Masuit.MyBlogs.Core.Models.Entity;
-using Masuit.MyBlogs.Core.Models.ViewModel;
-using System.Linq;
-
-namespace Masuit.MyBlogs.Core.Common
-
-{
-    public static class RegisterAutomapper
-    {
-        public static void Excute()
-        {
-            Mapper.Initialize(m =>
-            {
-                m.CreateMap<Broadcast, BroadcastInputDto>();
-                m.CreateMap<BroadcastInputDto, Broadcast>();
-                m.CreateMap<Broadcast, BroadcastOutputDto>();
-                m.CreateMap<BroadcastOutputDto, Broadcast>();
-                m.CreateMap<BroadcastOutputDto, BroadcastInputDto>();
-                m.CreateMap<BroadcastInputDto, BroadcastOutputDto>();
-
-                m.CreateMap<Category, CategoryInputDto>();
-                m.CreateMap<CategoryInputDto, Category>();
-                m.CreateMap<Category, CategoryOutputDto>();
-                m.CreateMap<CategoryOutputDto, Category>();
-                m.CreateMap<CategoryInputDto, CategoryOutputDto>();
-                m.CreateMap<CategoryOutputDto, CategoryInputDto>();
-
-                m.CreateMap<Comment, CommentInputDto>();
-                m.CreateMap<CommentInputDto, Comment>();
-                m.CreateMap<Comment, CommentOutputDto>();
-                m.CreateMap<CommentOutputDto, Comment>();
-                m.CreateMap<CommentInputDto, CommentOutputDto>();
-                m.CreateMap<CommentOutputDto, CommentInputDto>();
-                m.CreateMap<Comment, CommentViewModel>().ForMember(c => c.CommentDate, e => e.MapFrom(c => c.CommentDate.ToString("yyyy-MM-dd HH:mm:ss")));
-
-                m.CreateMap<Contacts, ContactsInputDto>();
-                m.CreateMap<ContactsInputDto, Contacts>();
-                m.CreateMap<Contacts, ContactsOutputDto>();
-                m.CreateMap<ContactsOutputDto, Contacts>();
-                m.CreateMap<ContactsInputDto, ContactsOutputDto>();
-                m.CreateMap<ContactsOutputDto, ContactsInputDto>();
-
-                //m.CreateMap<Interview, InterviewOutputDto>();
-
-                m.CreateMap<LeaveMessage, LeaveMessageInputDto>();
-                m.CreateMap<LeaveMessageInputDto, LeaveMessage>();
-                m.CreateMap<LeaveMessage, LeaveMessageOutputDto>();
-                m.CreateMap<LeaveMessageOutputDto, LeaveMessage>();
-                m.CreateMap<LeaveMessageInputDto, LeaveMessageOutputDto>();
-                m.CreateMap<LeaveMessageOutputDto, LeaveMessageInputDto>();
-                m.CreateMap<LeaveMessage, LeaveMessageViewModel>().ForMember(l => l.PostDate, e => e.MapFrom(l => l.PostDate.ToString("yyyy-MM-dd HH:mm:ss")));
-
-                m.CreateMap<Links, LinksInputDto>();
-                m.CreateMap<LinksInputDto, Links>();
-                m.CreateMap<Links, LinksOutputDto>();
-                m.CreateMap<LinksOutputDto, Links>();
-                m.CreateMap<LinksInputDto, LinksOutputDto>();
-                m.CreateMap<LinksOutputDto, LinksInputDto>();
-
-                m.CreateMap<Menu, MenuInputDto>();
-                m.CreateMap<MenuInputDto, Menu>();
-                m.CreateMap<Menu, MenuOutputDto>();
-                m.CreateMap<MenuOutputDto, Menu>();
-                m.CreateMap<MenuInputDto, MenuOutputDto>();
-                m.CreateMap<MenuOutputDto, MenuInputDto>();
-
-                m.CreateMap<Misc, MiscInputDto>();
-                m.CreateMap<MiscInputDto, Misc>();
-                m.CreateMap<Misc, MiscOutputDto>();
-                m.CreateMap<MiscOutputDto, Misc>();
-                m.CreateMap<MiscInputDto, MiscOutputDto>();
-                m.CreateMap<MiscOutputDto, MiscInputDto>();
-                m.CreateMap<Misc, MiscViewModel>().ForMember(c => c.PostDate, e => e.MapFrom(c => c.PostDate.ToString("yyyy-MM-dd HH:mm:ss"))).ForMember(c => c.ModifyDate, e => e.MapFrom(c => c.ModifyDate.ToString("yyyy-MM-dd HH:mm:ss")));
-
-                m.CreateMap<Notice, NoticeInputDto>();
-                m.CreateMap<NoticeInputDto, Notice>();
-                m.CreateMap<Notice, NoticeOutputDto>();
-                m.CreateMap<NoticeOutputDto, Notice>();
-                m.CreateMap<NoticeInputDto, NoticeOutputDto>();
-                m.CreateMap<NoticeOutputDto, NoticeInputDto>();
-                m.CreateMap<Notice, NoticeViewModel>().ForMember(c => c.PostDate, e => e.MapFrom(c => c.PostDate.ToString("yyyy-MM-dd HH:mm:ss"))).ForMember(c => c.ModifyDate, e => e.MapFrom(c => c.ModifyDate.ToString("yyyy-MM-dd HH:mm:ss")));
-
-                m.CreateMap<Post, PostInputDto>();
-                m.CreateMap<Post, PostHistoryVersion>().ForMember(v => v.PostId, e => e.MapFrom(p => p.Id));
-                m.CreateMap<PostInputDto, Post>();
-                m.CreateMap<Post, PostOutputDto>().ForMember(p => p.CategoryName, e => e.MapFrom(p => p.Category.Name)).ForMember(p => p.ViewCount, e => e.MapFrom(p => p.PostAccessRecord.Any() ? p.PostAccessRecord.Sum(r => r.ClickCount) : 0)).ForMember(p => p.AverageViewCount, e => e.MapFrom(p => p.PostAccessRecord.Any() ? p.PostAccessRecord.Average(r => r.ClickCount) : 0));
-                m.CreateMap<PostOutputDto, Post>();
-                m.CreateMap<PostInputDto, PostOutputDto>();
-                m.CreateMap<PostHistoryVersion, PostOutputDto>().ForMember(p => p.CategoryName, e => e.MapFrom(p => p.Category.Name));
-                m.CreateMap<PostOutputDto, PostInputDto>();
-                m.CreateMap<Post, PostViewModel>().ForMember(p => p.CategoryName, e => e.MapFrom(p => p.Category.Name)).ForMember(p => p.PostDate, e => e.MapFrom(p => p.PostDate.ToString("yyyy-MM-dd HH:mm:ss"))).ForMember(p => p.ModifyDate, e => e.MapFrom(p => p.ModifyDate.ToString("yyyy-MM-dd HH:mm:ss")));
-
-                m.CreateMap<SearchDetails, SearchDetailsInputDto>();
-                m.CreateMap<SearchDetailsInputDto, SearchDetails>();
-                m.CreateMap<SearchDetails, SearchDetailsOutputDto>();
-                m.CreateMap<SearchDetailsOutputDto, SearchDetails>();
-                m.CreateMap<SearchDetailsInputDto, SearchDetailsOutputDto>();
-                m.CreateMap<SearchDetailsOutputDto, SearchDetailsInputDto>();
-
-                m.CreateMap<UserInfo, UserInfoInputDto>();
-                m.CreateMap<UserInfoInputDto, UserInfo>();
-                m.CreateMap<UserInfo, UserInfoOutputDto>();
-                m.CreateMap<UserInfoOutputDto, UserInfo>();
-                m.CreateMap<UserInfoInputDto, UserInfoOutputDto>();
-                m.CreateMap<UserInfoOutputDto, UserInfoInputDto>();
-
-                m.CreateMap<LoginRecord, LoginRecordOutputDto>();
-                m.CreateMap<LoginRecordOutputDto, LoginRecord>();
-
-                m.CreateMap<Seminar, SeminarInputDto>();
-                m.CreateMap<SeminarInputDto, Seminar>();
-                m.CreateMap<Seminar, SeminarOutputDto>();
-                m.CreateMap<SeminarOutputDto, Seminar>();
-                m.CreateMap<SeminarInputDto, SeminarOutputDto>();
-                m.CreateMap<SeminarOutputDto, SeminarInputDto>();
-            });
-        }
-    }
-}

+ 0 - 7
src/Masuit.MyBlogs.Core/Configs/RegisterAutomapper.cs

@@ -41,13 +41,6 @@ namespace Masuit.MyBlogs.Core.Configs
                 m.CreateMap<CommentOutputDto, CommentInputDto>();
                 m.CreateMap<Comment, CommentViewModel>().ForMember(c => c.CommentDate, e => e.MapFrom(c => c.CommentDate.ToString("yyyy-MM-dd HH:mm:ss")));
 
-                m.CreateMap<Contacts, ContactsInputDto>();
-                m.CreateMap<ContactsInputDto, Contacts>();
-                m.CreateMap<Contacts, ContactsOutputDto>();
-                m.CreateMap<ContactsOutputDto, Contacts>();
-                m.CreateMap<ContactsInputDto, ContactsOutputDto>();
-                m.CreateMap<ContactsOutputDto, ContactsInputDto>();
-
                 m.CreateMap<LeaveMessage, LeaveMessageInputDto>();
                 m.CreateMap<LeaveMessageInputDto, LeaveMessage>();
                 m.CreateMap<LeaveMessage, LeaveMessageOutputDto>();

+ 1 - 7
src/Masuit.MyBlogs.Core/Controllers/BaseController.cs

@@ -43,11 +43,6 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// </summary>
         public ILinksService LinksService { get; set; }
 
-        /// <summary>
-        /// ContactsService
-        /// </summary>
-        public IContactsService ContactsService { get; set; }
-
         /// <summary>
         /// RedisHelper
         /// </summary>
@@ -157,8 +152,7 @@ namespace Masuit.MyBlogs.Core.Controllers
             ViewBag.menus = MenuService.LoadEntitiesFromL2Cache<MenuOutputDto>(m => m.Status == Status.Available).OrderBy(m => m.Sort).ToList(); //菜单
             PageFootViewModel model = new PageFootViewModel //页脚
             {
-                Links = LinksService.LoadPageEntitiesFromL2Cache<bool, LinksOutputDto>(1, 40, out int _, l => l.Status == Status.Available, l => l.Recommend, false).ToList(),
-                Contacts = ContactsService.LoadEntitiesFromL2Cache<int, ContactsOutputDto>(l => l.Status == Status.Available, l => l.Id, false).ToList()
+                Links = LinksService.LoadPageEntitiesFromL2Cache<bool, LinksOutputDto>(1, 40, out int _, l => l.Status == Status.Available, l => l.Recommend, false).ToList()
             };
             ViewBag.Footer = model;
 

+ 0 - 77
src/Masuit.MyBlogs.Core/Controllers/ContactController.cs

@@ -1,77 +0,0 @@
-using Masuit.MyBlogs.Core.Infrastructure.Services.Interface;
-using Masuit.MyBlogs.Core.Models.Entity;
-using Microsoft.AspNetCore.Mvc;
-using System;
-using System.Linq;
-
-namespace Masuit.MyBlogs.Core.Controllers
-{
-    /// <summary>
-    /// 联系方式管理
-    /// </summary>
-    public class ContactController : AdminController
-    {
-        /// <summary>
-        /// ContactService
-        /// </summary>
-        public IContactsService ContactService { get; set; }
-
-        /// <summary>
-        /// 联系方式管理
-        /// </summary>
-        /// <param name="contactsService"></param>
-        public ContactController(IContactsService contactsService)
-        {
-            ContactService = contactsService;
-        }
-
-        /// <summary>
-        /// 添加联系方式
-        /// </summary>
-        /// <param name="links"></param>
-        /// <returns></returns>
-        public ActionResult Add(Contacts links)
-        {
-            var e = ContactService.AddEntitySaved(links);
-            return e != null ? ResultData(null, message: "添加成功!") : ResultData(null, false, "添加失败!");
-        }
-
-        /// <summary>
-        /// 删除联系方式
-        /// </summary>
-        /// <param name="id"></param>
-        /// <returns></returns>
-        public ActionResult Delete(int id)
-        {
-            bool b = ContactService.DeleteByIdSaved(id);
-            return ResultData(null, b, b ? "删除成功!" : "删除失败!");
-        }
-
-        /// <summary>
-        /// 编辑联系方式
-        /// </summary>
-        /// <param name="model"></param>
-        /// <returns></returns>
-        public ActionResult Edit(Contacts model)
-        {
-            var contacts = ContactService.GetById(model.Id);
-            contacts.Title = model.Title;
-            contacts.Url = model.Url;
-            bool b = ContactService.UpdateEntitySaved(contacts);
-            return ResultData(null, b, b ? "保存成功" : "保存失败");
-        }
-
-        /// <summary>
-        /// 分页数据
-        /// </summary>
-        /// <param name="page"></param>
-        /// <param name="size"></param>
-        /// <returns></returns>
-        public ActionResult GetPageData(int page = 1, int size = 10)
-        {
-            var list = ContactService.LoadPageEntitiesNoTracking(page, size, out int total, l => true, l => l.Id, false).ToList();
-            var pageCount = Math.Ceiling(total * 1.0 / size).ToInt32();
-            return PageResult(list, pageCount, total);
-        }
-    }
-}

+ 0 - 3
src/Masuit.MyBlogs.Core/Infrastructure/Application/DataContext.cs

@@ -25,8 +25,6 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Application
             base.OnModelCreating(modelBuilder);
             modelBuilder.Entity<Category>().HasMany(e => e.Post).WithOne(e => e.Category).OnDelete(DeleteBehavior.Cascade);
             modelBuilder.Entity<Category>().HasMany(e => e.PostHistoryVersion).WithOne(e => e.Category).OnDelete(DeleteBehavior.Cascade);
-            modelBuilder.Entity<Contacts>().Property(e => e.Title).IsUnicode();
-            modelBuilder.Entity<Contacts>().Property(e => e.Url).IsUnicode();
             modelBuilder.Entity<Post>().Property(e => e.Email).IsUnicode();
             modelBuilder.Entity<Post>().Property(e => e.Label).IsUnicode();
             modelBuilder.Entity<Post>().HasMany(e => e.Comment).WithOne(e => e.Post).OnDelete(DeleteBehavior.Cascade);
@@ -55,7 +53,6 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Application
         public virtual DbSet<Broadcast> Broadcast { get; set; }
         public virtual DbSet<Category> Category { get; set; }
         public virtual DbSet<Comment> Comment { get; set; }
-        public virtual DbSet<Contacts> Contacts { get; set; }
         public virtual DbSet<LeaveMessage> LeaveMessage { get; set; }
         public virtual DbSet<Links> Links { get; set; }
         public virtual DbSet<Menu> Menu { get; set; }

+ 0 - 2
src/Masuit.MyBlogs.Core/Infrastructure/Repository/Interface/IBaseRepository.cs

@@ -540,8 +540,6 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository.Interface
 
     public partial interface ICommentRepository : IBaseRepository<Comment> { }
 
-    public partial interface IContactsRepository : IBaseRepository<Contacts> { }
-
     public partial interface IDonateRepository : IBaseRepository<Donate> { }
 
     public partial interface IFastShareRepository : IBaseRepository<FastShare> { }

+ 0 - 6
src/Masuit.MyBlogs.Core/Infrastructure/Repository/Repositories.cs

@@ -23,12 +23,6 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Repository
         {
         }
     }
-    public partial class ContactsRepository : BaseRepository<Contacts>, IContactsRepository
-    {
-        public ContactsRepository(DataContext dbContext, IDbConnection connection) : base(dbContext, connection)
-        {
-        }
-    }
     public partial class DonateRepository : BaseRepository<Donate>, IDonateRepository
     {
         public DonateRepository(DataContext dbContext, IDbConnection connection) : base(dbContext, connection)

+ 0 - 2
src/Masuit.MyBlogs.Core/Infrastructure/Services/Interface/IServices.cs

@@ -5,8 +5,6 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Services.Interface
 {
     public partial interface IBroadcastService : IBaseService<Broadcast> { }
 
-    public partial interface IContactsService : IBaseService<Contacts> { }
-
     public partial interface IDonateService : IBaseService<Donate> { }
 
     public partial interface IFastShareService : IBaseService<FastShare> { }

+ 0 - 7
src/Masuit.MyBlogs.Core/Infrastructure/Services/Services.cs

@@ -17,13 +17,6 @@ namespace Masuit.MyBlogs.Core.Infrastructure.Services
         }
     }
 
-    public partial class ContactsService : BaseService<Contacts>, IContactsService
-    {
-        public ContactsService(IBaseRepository<Contacts> repository, ISearchEngine<DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher)
-        {
-        }
-    }
-
     public partial class DonateService : BaseService<Donate>, IDonateService
     {
         public DonateService(IBaseRepository<Donate> repository, ISearchEngine<DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher)

+ 13 - 8
src/Masuit.MyBlogs.Core/Masuit.MyBlogs.Core.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <TargetFramework>netcoreapp2.2</TargetFramework>
     <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
-	<ServerGarbageCollection>false</ServerGarbageCollection>
+	<ServerGarbageCollection>true</ServerGarbageCollection>
     <ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
   </PropertyGroup>
 
@@ -15,6 +15,13 @@
     <DocumentationFile>D:\Private\Masuit.MyBlogs.Core\Masuit.MyBlogs.Core\Masuit.MyBlogs.Core.xml</DocumentationFile>
   </PropertyGroup>
 
+  <ItemGroup>
+    <Compile Remove="wwwroot\upload\**" />
+    <Content Remove="wwwroot\upload\**" />
+    <EmbeddedResource Remove="wwwroot\upload\**" />
+    <None Remove="wwwroot\upload\**" />
+  </ItemGroup>
+
   <ItemGroup>
     <Content Remove="bundleconfig.json" />
   </ItemGroup>
@@ -29,8 +36,6 @@
     <None Include="wwwroot\ng-views\controllers\analysis.min.js" />
     <None Include="wwwroot\ng-views\controllers\comment.js" />
     <None Include="wwwroot\ng-views\controllers\comment.min.js" />
-    <None Include="wwwroot\ng-views\controllers\contact.js" />
-    <None Include="wwwroot\ng-views\controllers\contact.min.js" />
     <None Include="wwwroot\ng-views\controllers\dashboard.js" />
     <None Include="wwwroot\ng-views\controllers\dashboard.min.js" />
     <None Include="wwwroot\ng-views\controllers\donate.js" />
@@ -58,26 +63,26 @@
 
   <ItemGroup>
     <PackageReference Include="Aspose.Words" Version="18.11.0" />
-    <PackageReference Include="Autofac" Version="4.8.1" />
+    <PackageReference Include="Autofac" Version="4.9.1" />
     <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.3.1" />
     <PackageReference Include="AutoMapper" Version="8.0.0" />
     <PackageReference Include="CacheManager.Microsoft.Extensions.Caching.Memory" Version="1.2.0" />
     <PackageReference Include="CacheManager.Serialization.Json" Version="1.2.0" />
-    <PackageReference Include="Dapper" Version="1.50.5" />
+    <PackageReference Include="Dapper" Version="1.50.7" />
     <PackageReference Include="EFSecondLevelCache.Core" Version="1.7.1" />
     <PackageReference Include="Hangfire" Version="1.6.22" />
     <PackageReference Include="Hangfire.Autofac" Version="2.3.1" />
     <PackageReference Include="Hangfire.Redis.StackExchange" Version="1.8.0" />
     <PackageReference Include="htmldiff.net-core" Version="1.3.6" />
     <PackageReference Include="Microsoft.AspNetCore.App" />
-    <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="2.2.1" />
-    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.1" />
+    <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="2.2.2" />
+    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.2" />
     <PackageReference Include="PanGu.HighLight" Version="1.0.0" />
     <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.2.0" />
     <PackageReference Include="Quartz" Version="3.0.7" />
     <PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
     <PackageReference Include="WilderMinds.RssSyndication" Version="1.4.0" />
-    <PackageReference Include="Z.EntityFramework.Extensions.EFCore" Version="2.1.48" />
+    <PackageReference Include="Z.EntityFramework.Extensions.EFCore" Version="2.1.49" />
     <PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="1.8.18" />
     <PackageReference Include="Z.ExtensionMethods" Version="2.1.1" />
   </ItemGroup>

+ 137 - 16
src/Masuit.MyBlogs.Core/Masuit.MyBlogs.Core.xml

@@ -94,6 +94,13 @@
             <param name="file">文件名</param>
             <returns></returns>
         </member>
+        <member name="M:Common.CommonHelper.UploadPeople(System.String)">
+            <summary>
+            上传图片到人民网图床
+            </summary>
+            <param name="file"></param>
+            <returns></returns>
+        </member>
         <member name="M:Common.CommonHelper.UploadImageFallback(System.String)">
             <summary>
             上传图片到sm图床
@@ -103,14 +110,14 @@
         </member>
         <member name="M:Common.CommonHelper.UploadImageFallback2(System.String)">
             <summary>
-            上传图片到百度图床
+            上传图片到新浪图床
             </summary>
             <param name="file">文件名</param>
             <returns></returns>
         </member>
         <member name="M:Common.CommonHelper.UploadImageFallback3(System.String)">
             <summary>
-            上传图片到百度图床
+            上传图片到新浪图床
             </summary>
             <param name="file">文件名</param>
             <returns></returns>
@@ -122,6 +129,13 @@
             <param name="content"></param>
             <returns></returns>
         </member>
+        <member name="M:Common.CommonHelper.IsRobot(Microsoft.AspNetCore.Http.HttpRequest)">
+            <summary>
+            是否是机器人访问
+            </summary>
+            <param name="req"></param>
+            <returns></returns>
+        </member>
         <member name="T:Masuit.MyBlogs.Core.Common.DocumentConvert">
             <summary>
             文档转换操作
@@ -246,6 +260,11 @@
             每日任务
             </summary>
         </member>
+        <member name="M:Masuit.MyBlogs.Core.Configs.HangfireJobInit.EveryweekJob">
+            <summary>
+            每周任务
+            </summary>
+        </member>
         <member name="T:Masuit.MyBlogs.Core.Configs.RegisterAutomapper">
             <summary>
             注册automapper
@@ -376,13 +395,14 @@
             MessageService
             </summary>
         </member>
-        <member name="M:Masuit.MyBlogs.Core.Controllers.BugController.#ctor(Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IIssueService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IInternalMessageService,Microsoft.AspNetCore.Hosting.IHostingEnvironment)">
+        <member name="M:Masuit.MyBlogs.Core.Controllers.BugController.#ctor(Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IIssueService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IInternalMessageService,Microsoft.AspNetCore.Hosting.IHostingEnvironment,Masuit.LuceneEFCore.SearchEngine.Interfaces.ISearchEngine{Masuit.MyBlogs.Core.Infrastructure.Application.DataContext})">
             <summary>
             bug反馈
             </summary>
             <param name="issueService"></param>
             <param name="messageService"></param>
             <param name="hostingEnvironment"></param>
+            <param name="searchEngine"></param>
         </member>
         <member name="M:Masuit.MyBlogs.Core.Controllers.BugController.Index">
             <summary>
@@ -1364,7 +1384,7 @@
             
             </summary>
         </member>
-        <member name="M:Masuit.MyBlogs.Core.Controllers.PostController.#ctor(Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IPostService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.ICategoryService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IBroadcastService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.ISeminarService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IPostHistoryVersionService,Microsoft.AspNetCore.Hosting.IHostingEnvironment,Masuit.LuceneEFCore.SearchEngine.Interfaces.ISearchEngine{Masuit.MyBlogs.Core.Infrastructure.Application.DataContext},Masuit.LuceneEFCore.SearchEngine.Interfaces.ILuceneIndexer,Masuit.LuceneEFCore.SearchEngine.Interfaces.ILuceneIndexSearcher)">
+        <member name="M:Masuit.MyBlogs.Core.Controllers.PostController.#ctor(Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IPostService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.ICategoryService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IBroadcastService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.ISeminarService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IPostHistoryVersionService,Microsoft.AspNetCore.Hosting.IHostingEnvironment,Masuit.LuceneEFCore.SearchEngine.Interfaces.ISearchEngine{Masuit.MyBlogs.Core.Infrastructure.Application.DataContext})">
             <summary>
             文章管理
             </summary>
@@ -1375,8 +1395,6 @@
             <param name="postHistoryVersionService"></param>
             <param name="hostingEnvironment"></param>
             <param name="searchEngine"></param>
-            <param name="luceneIndexer"></param>
-            <param name="luceneIndexSearcher"></param>
         </member>
         <member name="M:Masuit.MyBlogs.Core.Controllers.PostController.Details(System.Int32,System.String)">
             <summary>
@@ -1715,12 +1733,6 @@
             <param name="id"></param>
             <returns></returns>
         </member>
-        <member name="M:Masuit.MyBlogs.Core.Controllers.SearchController.CreateIndex">
-            <summary>
-            创建索引
-            </summary>
-            <returns></returns>
-        </member>
         <member name="T:Masuit.MyBlogs.Core.Controllers.SeminarController">
             <summary>
             专题页
@@ -2270,7 +2282,7 @@
             hangfire后台任务
             </summary>
         </member>
-        <member name="M:Masuit.MyBlogs.Core.Extensions.Hangfire.HangfireBackJob.#ctor(Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IUserInfoService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IPostService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.ISystemSettingService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.ISearchDetailsService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.ILinksService,Masuit.Tools.NoSQL.RedisHelper,System.Net.Http.IHttpClientFactory,Microsoft.AspNetCore.Hosting.IHostingEnvironment)">
+        <member name="M:Masuit.MyBlogs.Core.Extensions.Hangfire.HangfireBackJob.#ctor(Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IUserInfoService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.IPostService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.ISystemSettingService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.ISearchDetailsService,Masuit.MyBlogs.Core.Infrastructure.Services.Interface.ILinksService,Masuit.Tools.Core.NoSQL.RedisHelperFactory,System.Net.Http.IHttpClientFactory,Microsoft.AspNetCore.Hosting.IHostingEnvironment,Masuit.LuceneEFCore.SearchEngine.Interfaces.ISearchEngine{Masuit.MyBlogs.Core.Infrastructure.Application.DataContext})">
             <summary>
             hangfire后台任务
             </summary>
@@ -2279,9 +2291,10 @@
             <param name="settingService"></param>
             <param name="searchDetailsService"></param>
             <param name="linksService"></param>
-            <param name="redisHelper"></param>
+            <param name="redis"></param>
             <param name="httpClientFactory"></param>
             <param name="hostingEnvironment"></param>
+            <param name="searchEngine"></param>
         </member>
         <member name="M:Masuit.MyBlogs.Core.Extensions.Hangfire.HangfireBackJob.LoginRecord(Masuit.MyBlogs.Core.Models.DTO.UserInfoOutputDto,System.String,Masuit.MyBlogs.Core.Models.Enum.LoginType)">
             <summary>
@@ -2319,6 +2332,11 @@
             检查友链
             </summary>
         </member>
+        <member name="M:Masuit.MyBlogs.Core.Extensions.Hangfire.HangfireBackJob.CreateLuceneIndex">
+            <summary>
+            重建Lucene索引库
+            </summary>
+        </member>
         <member name="T:Masuit.MyBlogs.Core.Extensions.Hangfire.IHangfireBackJob">
             <summary>
             hangfire后台任务
@@ -2354,6 +2372,11 @@
             友链检查
             </summary>
         </member>
+        <member name="M:Masuit.MyBlogs.Core.Extensions.Hangfire.IHangfireBackJob.CreateLuceneIndex">
+            <summary>
+            重建Lucene索引库
+            </summary>
+        </member>
         <member name="T:Masuit.MyBlogs.Core.Extensions.LuceneHelper">
             <summary>
             Lucene帮助类
@@ -4988,6 +5011,104 @@
             <param name="id"></param>
             <returns></returns>
         </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.AddEntitySaved(Masuit.MyBlogs.Core.Models.Entity.Post)">
+            <summary>
+            添加实体并保存
+            </summary>
+            <param name="t">需要添加的实体</param>
+            <returns>添加成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.AddEntitySavedAsync(Masuit.MyBlogs.Core.Models.Entity.Post)">
+            <summary>
+            添加实体并保存(异步)
+            </summary>
+            <param name="t">需要添加的实体</param>
+            <returns>添加成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.DeleteByIdSaved(System.Object)">
+            <summary>
+            根据ID删除实体并保存
+            </summary>
+            <param name="id">实体id</param>
+            <returns>删除成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.DeleteEntitiesSaved(System.Collections.Generic.IEnumerable{Masuit.MyBlogs.Core.Models.Entity.Post})">
+            <summary>
+            删除多个实体并保存
+            </summary>
+            <param name="list">实体集合</param>
+            <returns>删除成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.DeleteByIdSavedAsync(System.Object)">
+            <summary>
+            根据ID删除实体并保存(异步)
+            </summary>
+            <param name="id">实体id</param>
+            <returns>删除成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.DeleteEntitiesSavedAsync(System.Collections.Generic.IEnumerable{Masuit.MyBlogs.Core.Models.Entity.Post})">
+            <summary>
+            删除多个实体并保存(异步)
+            </summary>
+            <param name="list">实体集合</param>
+            <returns>删除成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.DeleteEntitySaved(System.Linq.Expressions.Expression{System.Func{Masuit.MyBlogs.Core.Models.Entity.Post,System.Boolean}})">
+            <summary>
+            根据条件删除实体
+            </summary>
+            <param name="where">查询条件</param>
+            <returns>删除成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.DeleteEntitySaved(Masuit.MyBlogs.Core.Models.Entity.Post)">
+            <summary>
+            删除实体并保存
+            </summary>
+            <param name="t">需要删除的实体</param>
+            <returns>删除成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.DeleteEntitySavedAsync(System.Linq.Expressions.Expression{System.Func{Masuit.MyBlogs.Core.Models.Entity.Post,System.Boolean}})">
+            <summary>
+            根据条件删除实体
+            </summary>
+            <param name="where">查询条件</param>
+            <returns>删除成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.DeleteEntitySavedAsync(Masuit.MyBlogs.Core.Models.Entity.Post)">
+            <summary>
+            删除实体并保存(异步)
+            </summary>
+            <param name="t">需要删除的实体</param>
+            <returns>删除成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.UpdateEntitySaved(Masuit.MyBlogs.Core.Models.Entity.Post)">
+            <summary>
+            更新实体并保存
+            </summary>
+            <param name="t">更新后的实体</param>
+            <returns>更新成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.UpdateEntitiesSaved(System.Collections.Generic.IEnumerable{Masuit.MyBlogs.Core.Models.Entity.Post})">
+            <summary>
+            更新多个实体并保存
+            </summary>
+            <param name="list">实体集合</param>
+            <returns>更新成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.UpdateEntitiesSavedAsync(System.Collections.Generic.IEnumerable{Masuit.MyBlogs.Core.Models.Entity.Post})">
+            <summary>
+            更新多个实体并保存(异步)
+            </summary>
+            <param name="list">实体集合</param>
+            <returns>更新成功</returns>
+        </member>
+        <member name="M:Masuit.MyBlogs.Core.Infrastructure.Services.PostService.UpdateEntitySavedAsync(Masuit.MyBlogs.Core.Models.Entity.Post)">
+            <summary>
+            更新实体并保存(异步)
+            </summary>
+            <param name="t">更新后的实体</param>
+            <returns>更新成功</returns>
+        </member>
         <member name="T:Masuit.MyBlogs.Core.Models.DTO.BaseDto">
             <summary>
             DTO基类
@@ -7526,14 +7647,14 @@
             <param name="services"></param>
             <returns></returns>
         </member>
-        <member name="M:Masuit.MyBlogs.Core.Startup.Configure(Microsoft.AspNetCore.Builder.IApplicationBuilder,Microsoft.AspNetCore.Hosting.IHostingEnvironment,Masuit.MyBlogs.Core.Infrastructure.Application.DataContext,Masuit.LuceneEFCore.SearchEngine.Interfaces.ISearchEngine{Masuit.MyBlogs.Core.Infrastructure.Application.DataContext},Masuit.LuceneEFCore.SearchEngine.LuceneIndexerOptions)">
+        <member name="M:Masuit.MyBlogs.Core.Startup.Configure(Microsoft.AspNetCore.Builder.IApplicationBuilder,Microsoft.AspNetCore.Hosting.IHostingEnvironment,Masuit.MyBlogs.Core.Infrastructure.Application.DataContext,Masuit.MyBlogs.Core.Extensions.Hangfire.IHangfireBackJob,Masuit.LuceneEFCore.SearchEngine.LuceneIndexerOptions)">
             <summary>
             Configure
             </summary>
             <param name="app"></param>
             <param name="env"></param>
             <param name="db"></param>
-            <param name="searchEngine"></param>
+            <param name="hangfire"></param>
             <param name="luceneIndexerOptions"></param>
         </member>
         <member name="T:Masuit.MyBlogs.Core.MyRestrictiveAuthorizationFilter">

+ 0 - 705
src/Masuit.MyBlogs.Core/Migrations/20190126133804_Init.Designer.cs

@@ -1,705 +0,0 @@
-// <auto-generated />
-using System;
-using Masuit.MyBlogs.Core.Infrastructure.Application;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-namespace Masuit.MyBlogs.Core.Migrations
-{
-    [DbContext(typeof(DataContext))]
-    [Migration("20190126133804_Init")]
-    partial class Init
-    {
-        protected override void BuildTargetModel(ModelBuilder modelBuilder)
-        {
-#pragma warning disable 612, 618
-            modelBuilder
-                .HasAnnotation("ProductVersion", "2.2.1-servicing-10028")
-                .HasAnnotation("Relational:MaxIdentifierLength", 64);
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Broadcast", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Email");
-
-                    b.Property<int>("Status");
-
-                    b.Property<int>("SubscribeType");
-
-                    b.Property<DateTime>("UpdateTime");
-
-                    b.Property<string>("ValidateCode");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Broadcast");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Category", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Description");
-
-                    b.Property<string>("Name")
-                        .IsRequired()
-                        .HasMaxLength(64);
-
-                    b.Property<int>("Status");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Category");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Comment", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<int>("AgainstCount");
-
-                    b.Property<string>("Browser")
-                        .HasMaxLength(255);
-
-                    b.Property<DateTime>("CommentDate");
-
-                    b.Property<string>("Content")
-                        .IsRequired();
-
-                    b.Property<string>("Email");
-
-                    b.Property<string>("IP");
-
-                    b.Property<bool>("IsMaster");
-
-                    b.Property<string>("NickName")
-                        .IsRequired()
-                        .HasMaxLength(24);
-
-                    b.Property<string>("OperatingSystem")
-                        .HasMaxLength(255);
-
-                    b.Property<int>("ParentId");
-
-                    b.Property<int>("PostId");
-
-                    b.Property<string>("QQorWechat");
-
-                    b.Property<int>("Status");
-
-                    b.Property<int>("VoteCount");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("PostId");
-
-                    b.ToTable("Comment");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Contacts", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("Title")
-                        .IsRequired()
-                        .IsUnicode(true);
-
-                    b.Property<string>("Url")
-                        .IsRequired()
-                        .IsUnicode(true);
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Contacts");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Donate", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Amount");
-
-                    b.Property<DateTime>("DonateTime");
-
-                    b.Property<string>("Email");
-
-                    b.Property<string>("EmailDisplay");
-
-                    b.Property<string>("NickName");
-
-                    b.Property<string>("QQorWechat");
-
-                    b.Property<string>("QQorWechatDisplay");
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("Via");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Donate");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.FastShare", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Link");
-
-                    b.Property<int>("Sort");
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("Title");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("FastShare");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.InternalMessage", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Content");
-
-                    b.Property<string>("Link");
-
-                    b.Property<bool>("Read");
-
-                    b.Property<int>("Status");
-
-                    b.Property<DateTime>("Time");
-
-                    b.Property<string>("Title");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("InternalMessage");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Issue", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Description")
-                        .IsRequired();
-
-                    b.Property<string>("Email");
-
-                    b.Property<DateTime?>("HandleTime");
-
-                    b.Property<string>("IPAddress");
-
-                    b.Property<int>("Level");
-
-                    b.Property<string>("Link")
-                        .IsRequired();
-
-                    b.Property<string>("Msg");
-
-                    b.Property<string>("Name")
-                        .IsRequired();
-
-                    b.Property<int>("Status");
-
-                    b.Property<DateTime>("SubmitTime");
-
-                    b.Property<string>("Title")
-                        .IsRequired();
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Issue");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.LeaveMessage", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Browser")
-                        .HasMaxLength(255);
-
-                    b.Property<string>("Content")
-                        .IsRequired();
-
-                    b.Property<string>("Email");
-
-                    b.Property<string>("IP");
-
-                    b.Property<bool>("IsMaster");
-
-                    b.Property<string>("NickName")
-                        .IsRequired();
-
-                    b.Property<string>("OperatingSystem")
-                        .HasMaxLength(255);
-
-                    b.Property<int>("ParentId");
-
-                    b.Property<DateTime>("PostDate");
-
-                    b.Property<string>("QQorWechat");
-
-                    b.Property<int>("Status");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("LeaveMessage");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Links", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<bool>("Except");
-
-                    b.Property<string>("Name")
-                        .IsRequired();
-
-                    b.Property<bool>("Recommend");
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("Url")
-                        .IsRequired();
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Links");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.LoginRecord", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("IP");
-
-                    b.Property<DateTime>("LoginTime");
-
-                    b.Property<int>("LoginType");
-
-                    b.Property<string>("PhysicAddress");
-
-                    b.Property<string>("Province");
-
-                    b.Property<int>("Status");
-
-                    b.Property<int>("UserInfoId");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("UserInfoId");
-
-                    b.ToTable("LoginRecord");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Menu", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Icon");
-
-                    b.Property<int>("MenuType");
-
-                    b.Property<string>("Name")
-                        .IsRequired();
-
-                    b.Property<bool>("NewTab");
-
-                    b.Property<int>("ParentId");
-
-                    b.Property<int>("Sort");
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("Url")
-                        .IsRequired();
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Menu");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Misc", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Content")
-                        .IsRequired();
-
-                    b.Property<DateTime>("ModifyDate");
-
-                    b.Property<DateTime>("PostDate");
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("Title")
-                        .IsRequired();
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Misc");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Notice", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Content")
-                        .IsRequired();
-
-                    b.Property<DateTime>("ModifyDate");
-
-                    b.Property<DateTime>("PostDate");
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("Title")
-                        .IsRequired();
-
-                    b.Property<int>("ViewCount");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Notice");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Post", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Author")
-                        .IsRequired()
-                        .HasMaxLength(24);
-
-                    b.Property<int>("CategoryId");
-
-                    b.Property<string>("Content")
-                        .IsRequired();
-
-                    b.Property<string>("Description")
-                        .HasMaxLength(255);
-
-                    b.Property<string>("Email")
-                        .IsRequired()
-                        .IsUnicode(true);
-
-                    b.Property<string>("ImageUrl")
-                        .HasMaxLength(255);
-
-                    b.Property<bool>("IsBanner");
-
-                    b.Property<bool>("IsFixedTop");
-
-                    b.Property<bool>("IsWordDocument");
-
-                    b.Property<string>("Keyword")
-                        .HasMaxLength(256);
-
-                    b.Property<string>("Label")
-                        .HasMaxLength(256)
-                        .IsUnicode(true);
-
-                    b.Property<DateTime>("ModifyDate");
-
-                    b.Property<DateTime>("PostDate");
-
-                    b.Property<string>("ProtectContent");
-
-                    b.Property<string>("ResourceName");
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("Title")
-                        .IsRequired();
-
-                    b.Property<int>("VoteDownCount")
-                        .ValueGeneratedOnAddOrUpdate();
-
-                    b.Property<int>("VoteUpCount");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("CategoryId");
-
-                    b.ToTable("Post");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.PostAccessRecord", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<DateTime>("AccessTime");
-
-                    b.Property<int>("ClickCount");
-
-                    b.Property<int>("PostId");
-
-                    b.Property<int>("Status");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("PostId");
-
-                    b.ToTable("PostAccessRecord");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.PostHistoryVersion", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<int>("CategoryId");
-
-                    b.Property<string>("Content")
-                        .IsRequired();
-
-                    b.Property<string>("Email")
-                        .HasMaxLength(255);
-
-                    b.Property<bool>("IsWordDocument");
-
-                    b.Property<string>("Label")
-                        .HasMaxLength(255);
-
-                    b.Property<DateTime>("ModifyDate");
-
-                    b.Property<int>("PostId");
-
-                    b.Property<string>("ProtectContent");
-
-                    b.Property<string>("ResourceName");
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("Title")
-                        .IsRequired()
-                        .HasMaxLength(64);
-
-                    b.Property<int>("ViewCount");
-
-                    b.HasKey("Id");
-
-                    b.HasIndex("CategoryId");
-
-                    b.HasIndex("PostId");
-
-                    b.ToTable("PostHistoryVersion");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.SearchDetails", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("IP");
-
-                    b.Property<string>("KeyWords")
-                        .IsRequired()
-                        .IsUnicode(true);
-
-                    b.Property<DateTime>("SearchTime");
-
-                    b.HasKey("Id");
-
-                    b.ToTable("SearchDetails");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Seminar", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Description")
-                        .IsRequired();
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("SubTitle");
-
-                    b.Property<string>("Title")
-                        .IsRequired();
-
-                    b.HasKey("Id");
-
-                    b.ToTable("Seminar");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.SeminarPost", b =>
-                {
-                    b.Property<int>("SeminarId")
-                        .HasColumnName("Seminar_Id");
-
-                    b.Property<int>("PostId")
-                        .HasColumnName("Post_Id");
-
-                    b.HasKey("SeminarId", "PostId");
-
-                    b.HasIndex("PostId");
-
-                    b.ToTable("SeminarPost");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.SeminarPostHistoryVersion", b =>
-                {
-                    b.Property<int>("SeminarId")
-                        .HasColumnName("Seminar_Id");
-
-                    b.Property<int>("PostHistoryVersionId")
-                        .HasColumnName("PostHistoryVersion_Id");
-
-                    b.HasKey("SeminarId", "PostHistoryVersionId");
-
-                    b.HasIndex("PostHistoryVersionId");
-
-                    b.ToTable("SeminarPostHistoryVersion");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.SystemSetting", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("Name")
-                        .IsRequired();
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("Value")
-                        .IsRequired();
-
-                    b.HasKey("Id");
-
-                    b.ToTable("SystemSetting");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.UserInfo", b =>
-                {
-                    b.Property<int>("Id")
-                        .ValueGeneratedOnAdd();
-
-                    b.Property<string>("AccessToken");
-
-                    b.Property<string>("Avatar");
-
-                    b.Property<string>("Email");
-
-                    b.Property<bool>("IsAdmin");
-
-                    b.Property<string>("NickName")
-                        .IsRequired();
-
-                    b.Property<string>("Password")
-                        .IsRequired();
-
-                    b.Property<string>("QQorWechat");
-
-                    b.Property<string>("SaltKey")
-                        .IsRequired();
-
-                    b.Property<int>("Status");
-
-                    b.Property<string>("Username")
-                        .IsRequired();
-
-                    b.HasKey("Id");
-
-                    b.ToTable("UserInfo");
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Comment", b =>
-                {
-                    b.HasOne("Masuit.MyBlogs.Core.Models.Entity.Post", "Post")
-                        .WithMany("Comment")
-                        .HasForeignKey("PostId")
-                        .OnDelete(DeleteBehavior.Cascade);
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.LoginRecord", b =>
-                {
-                    b.HasOne("Masuit.MyBlogs.Core.Models.Entity.UserInfo", "UserInfo")
-                        .WithMany("LoginRecord")
-                        .HasForeignKey("UserInfoId")
-                        .OnDelete(DeleteBehavior.Cascade);
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.Post", b =>
-                {
-                    b.HasOne("Masuit.MyBlogs.Core.Models.Entity.Category", "Category")
-                        .WithMany("Post")
-                        .HasForeignKey("CategoryId")
-                        .OnDelete(DeleteBehavior.Cascade);
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.PostAccessRecord", b =>
-                {
-                    b.HasOne("Masuit.MyBlogs.Core.Models.Entity.Post", "Post")
-                        .WithMany("PostAccessRecord")
-                        .HasForeignKey("PostId")
-                        .OnDelete(DeleteBehavior.Cascade);
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.PostHistoryVersion", b =>
-                {
-                    b.HasOne("Masuit.MyBlogs.Core.Models.Entity.Category", "Category")
-                        .WithMany("PostHistoryVersion")
-                        .HasForeignKey("CategoryId")
-                        .OnDelete(DeleteBehavior.Cascade);
-
-                    b.HasOne("Masuit.MyBlogs.Core.Models.Entity.Post", "Post")
-                        .WithMany("PostHistoryVersion")
-                        .HasForeignKey("PostId")
-                        .OnDelete(DeleteBehavior.Cascade);
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.SeminarPost", b =>
-                {
-                    b.HasOne("Masuit.MyBlogs.Core.Models.Entity.Post", "Post")
-                        .WithMany("Seminar")
-                        .HasForeignKey("PostId")
-                        .OnDelete(DeleteBehavior.Cascade);
-
-                    b.HasOne("Masuit.MyBlogs.Core.Models.Entity.Seminar", "Seminar")
-                        .WithMany("Post")
-                        .HasForeignKey("SeminarId")
-                        .OnDelete(DeleteBehavior.Cascade);
-                });
-
-            modelBuilder.Entity("Masuit.MyBlogs.Core.Models.Entity.SeminarPostHistoryVersion", b =>
-                {
-                    b.HasOne("Masuit.MyBlogs.Core.Models.Entity.PostHistoryVersion", "PostHistoryVersion")
-                        .WithMany("Seminar")
-                        .HasForeignKey("PostHistoryVersionId")
-                        .OnDelete(DeleteBehavior.Cascade);
-
-                    b.HasOne("Masuit.MyBlogs.Core.Models.Entity.Seminar", "Seminar")
-                        .WithMany("PostHistoryVersion")
-                        .HasForeignKey("SeminarId")
-                        .OnDelete(DeleteBehavior.Cascade);
-                });
-#pragma warning restore 612, 618
-        }
-    }
-}

+ 0 - 433
src/Masuit.MyBlogs.Core/Migrations/20190126133804_Init.cs

@@ -1,433 +0,0 @@
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using System;
-
-namespace Masuit.MyBlogs.Core.Migrations
-{
-    public partial class Init : Migration
-    {
-        protected override void Up(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.CreateTable(name: "Broadcast", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Email = table.Column<string>(nullable: true),
-                ValidateCode = table.Column<string>(nullable: true),
-                UpdateTime = table.Column<DateTime>(nullable: false),
-                SubscribeType = table.Column<int>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Broadcast", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "Category", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Name = table.Column<string>(maxLength: 64, nullable: false),
-                Description = table.Column<string>(nullable: true)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Category", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "Contacts", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Title = table.Column<string>(nullable: false),
-                Url = table.Column<string>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Contacts", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "Donate", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                NickName = table.Column<string>(nullable: true),
-                Email = table.Column<string>(nullable: true),
-                QQorWechat = table.Column<string>(nullable: true),
-                EmailDisplay = table.Column<string>(nullable: true),
-                QQorWechatDisplay = table.Column<string>(nullable: true),
-                Amount = table.Column<string>(nullable: true),
-                Via = table.Column<string>(nullable: true),
-                DonateTime = table.Column<DateTime>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Donate", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "FastShare", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Title = table.Column<string>(nullable: true),
-                Link = table.Column<string>(nullable: true),
-                Sort = table.Column<int>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_FastShare", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "InternalMessage", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Title = table.Column<string>(nullable: true),
-                Content = table.Column<string>(nullable: true),
-                Link = table.Column<string>(nullable: true),
-                Time = table.Column<DateTime>(nullable: false),
-                Read = table.Column<bool>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_InternalMessage", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "Issue", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Name = table.Column<string>(nullable: false),
-                Email = table.Column<string>(nullable: true),
-                Title = table.Column<string>(nullable: false),
-                Link = table.Column<string>(nullable: false),
-                Description = table.Column<string>(nullable: false),
-                Level = table.Column<int>(nullable: false),
-                SubmitTime = table.Column<DateTime>(nullable: false),
-                HandleTime = table.Column<DateTime>(nullable: true),
-                Msg = table.Column<string>(nullable: true),
-                IPAddress = table.Column<string>(nullable: true)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Issue", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "LeaveMessage", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                NickName = table.Column<string>(nullable: false),
-                Content = table.Column<string>(nullable: false),
-                PostDate = table.Column<DateTime>(nullable: false),
-                Email = table.Column<string>(nullable: true),
-                QQorWechat = table.Column<string>(nullable: true),
-                ParentId = table.Column<int>(nullable: false),
-                Browser = table.Column<string>(maxLength: 255, nullable: true),
-                OperatingSystem = table.Column<string>(maxLength: 255, nullable: true),
-                IsMaster = table.Column<bool>(nullable: false),
-                IP = table.Column<string>(nullable: true)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_LeaveMessage", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "Links", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Name = table.Column<string>(nullable: false),
-                Url = table.Column<string>(nullable: false),
-                Except = table.Column<bool>(nullable: false),
-                Recommend = table.Column<bool>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Links", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "Menu", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Name = table.Column<string>(nullable: false),
-                Icon = table.Column<string>(nullable: true),
-                Url = table.Column<string>(nullable: false),
-                Sort = table.Column<int>(nullable: false),
-                ParentId = table.Column<int>(nullable: false),
-                MenuType = table.Column<int>(nullable: false),
-                NewTab = table.Column<bool>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Menu", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "Misc", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Title = table.Column<string>(nullable: false),
-                Content = table.Column<string>(nullable: false),
-                PostDate = table.Column<DateTime>(nullable: false),
-                ModifyDate = table.Column<DateTime>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Misc", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "Notice", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Title = table.Column<string>(nullable: false),
-                Content = table.Column<string>(nullable: false),
-                PostDate = table.Column<DateTime>(nullable: false),
-                ModifyDate = table.Column<DateTime>(nullable: false),
-                ViewCount = table.Column<int>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Notice", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "SearchDetails", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                KeyWords = table.Column<string>(nullable: false),
-                SearchTime = table.Column<DateTime>(nullable: false),
-                IP = table.Column<string>(nullable: true)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_SearchDetails", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "Seminar", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Title = table.Column<string>(nullable: false),
-                SubTitle = table.Column<string>(nullable: true),
-                Description = table.Column<string>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Seminar", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "SystemSetting", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Name = table.Column<string>(nullable: false),
-                Value = table.Column<string>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_SystemSetting", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "UserInfo", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Username = table.Column<string>(nullable: false),
-                NickName = table.Column<string>(nullable: false),
-                Password = table.Column<string>(nullable: false),
-                SaltKey = table.Column<string>(nullable: false),
-                IsAdmin = table.Column<bool>(nullable: false),
-                Email = table.Column<string>(nullable: true),
-                QQorWechat = table.Column<string>(nullable: true),
-                Avatar = table.Column<string>(nullable: true),
-                AccessToken = table.Column<string>(nullable: true)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_UserInfo", x => x.Id);
-            });
-
-            migrationBuilder.CreateTable(name: "Post", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Title = table.Column<string>(nullable: false),
-                Author = table.Column<string>(maxLength: 24, nullable: false),
-                Content = table.Column<string>(nullable: false),
-                ProtectContent = table.Column<string>(nullable: true),
-                PostDate = table.Column<DateTime>(nullable: false),
-                ModifyDate = table.Column<DateTime>(nullable: false),
-                IsFixedTop = table.Column<bool>(nullable: false),
-                CategoryId = table.Column<int>(nullable: false),
-                ResourceName = table.Column<string>(nullable: true),
-                IsWordDocument = table.Column<bool>(nullable: false),
-                Email = table.Column<string>(nullable: false),
-                Label = table.Column<string>(maxLength: 256, nullable: true),
-                Keyword = table.Column<string>(maxLength: 256, nullable: true),
-                VoteUpCount = table.Column<int>(nullable: false),
-                VoteDownCount = table.Column<int>(nullable: false),
-                IsBanner = table.Column<bool>(nullable: false),
-                Description = table.Column<string>(maxLength: 255, nullable: true),
-                ImageUrl = table.Column<string>(maxLength: 255, nullable: true)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Post", x => x.Id);
-                table.ForeignKey(name: "FK_Post_Category_CategoryId", column: x => x.CategoryId, principalTable: "Category", principalColumn: "Id", onDelete: ReferentialAction.Cascade);
-            });
-
-            migrationBuilder.CreateTable(name: "LoginRecord", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                IP = table.Column<string>(nullable: true),
-                LoginTime = table.Column<DateTime>(nullable: false),
-                Province = table.Column<string>(nullable: true),
-                PhysicAddress = table.Column<string>(nullable: true),
-                LoginType = table.Column<int>(nullable: false),
-                UserInfoId = table.Column<int>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_LoginRecord", x => x.Id);
-                table.ForeignKey(name: "FK_LoginRecord_UserInfo_UserInfoId", column: x => x.UserInfoId, principalTable: "UserInfo", principalColumn: "Id", onDelete: ReferentialAction.Cascade);
-            });
-
-            migrationBuilder.CreateTable(name: "Comment", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                NickName = table.Column<string>(maxLength: 24, nullable: false),
-                Email = table.Column<string>(nullable: true),
-                QQorWechat = table.Column<string>(nullable: true),
-                Content = table.Column<string>(nullable: false),
-                ParentId = table.Column<int>(nullable: false),
-                PostId = table.Column<int>(nullable: false),
-                CommentDate = table.Column<DateTime>(nullable: false),
-                Browser = table.Column<string>(maxLength: 255, nullable: true),
-                OperatingSystem = table.Column<string>(maxLength: 255, nullable: true),
-                IsMaster = table.Column<bool>(nullable: false),
-                VoteCount = table.Column<int>(nullable: false),
-                AgainstCount = table.Column<int>(nullable: false),
-                IP = table.Column<string>(nullable: true)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_Comment", x => x.Id);
-                table.ForeignKey(name: "FK_Comment_Post_PostId", column: x => x.PostId, principalTable: "Post", principalColumn: "Id", onDelete: ReferentialAction.Cascade);
-            });
-
-            migrationBuilder.CreateTable(name: "PostAccessRecord", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                PostId = table.Column<int>(nullable: false),
-                AccessTime = table.Column<DateTime>(nullable: false),
-                ClickCount = table.Column<int>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_PostAccessRecord", x => x.Id);
-                table.ForeignKey(name: "FK_PostAccessRecord_Post_PostId", column: x => x.PostId, principalTable: "Post", principalColumn: "Id", onDelete: ReferentialAction.Cascade);
-            });
-
-            migrationBuilder.CreateTable(name: "PostHistoryVersion", columns: table => new
-            {
-                Id = table.Column<int>(nullable: false).Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
-                Status = table.Column<int>(nullable: false),
-                Title = table.Column<string>(maxLength: 64, nullable: false),
-                Content = table.Column<string>(nullable: false),
-                ProtectContent = table.Column<string>(nullable: true),
-                ViewCount = table.Column<int>(nullable: false),
-                ModifyDate = table.Column<DateTime>(nullable: false),
-                CategoryId = table.Column<int>(nullable: false),
-                PostId = table.Column<int>(nullable: false),
-                ResourceName = table.Column<string>(nullable: true),
-                IsWordDocument = table.Column<bool>(nullable: false),
-                Email = table.Column<string>(maxLength: 255, nullable: true),
-                Label = table.Column<string>(maxLength: 255, nullable: true)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_PostHistoryVersion", x => x.Id);
-                table.ForeignKey(name: "FK_PostHistoryVersion_Category_CategoryId", column: x => x.CategoryId, principalTable: "Category", principalColumn: "Id", onDelete: ReferentialAction.Cascade);
-                table.ForeignKey(name: "FK_PostHistoryVersion_Post_PostId", column: x => x.PostId, principalTable: "Post", principalColumn: "Id", onDelete: ReferentialAction.Cascade);
-            });
-
-            migrationBuilder.CreateTable(name: "SeminarPost", columns: table => new
-            {
-                Seminar_Id = table.Column<int>(nullable: false),
-                Post_Id = table.Column<int>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_SeminarPost", x => new
-                {
-                    x.Seminar_Id,
-                    x.Post_Id
-                });
-                table.ForeignKey(name: "FK_SeminarPost_Post_Post_Id", column: x => x.Post_Id, principalTable: "Post", principalColumn: "Id", onDelete: ReferentialAction.Cascade);
-                table.ForeignKey(name: "FK_SeminarPost_Seminar_Seminar_Id", column: x => x.Seminar_Id, principalTable: "Seminar", principalColumn: "Id", onDelete: ReferentialAction.Cascade);
-            });
-
-            migrationBuilder.CreateTable(name: "SeminarPostHistoryVersion", columns: table => new
-            {
-                Seminar_Id = table.Column<int>(nullable: false),
-                PostHistoryVersion_Id = table.Column<int>(nullable: false)
-            }, constraints: table =>
-            {
-                table.PrimaryKey("PK_SeminarPostHistoryVersion", x => new
-                {
-                    x.Seminar_Id,
-                    x.PostHistoryVersion_Id
-                });
-                table.ForeignKey(name: "FK_SeminarPostHistoryVersion_PostHistoryVersion_PostHistoryVers~", column: x => x.PostHistoryVersion_Id, principalTable: "PostHistoryVersion", principalColumn: "Id", onDelete: ReferentialAction.Cascade);
-                table.ForeignKey(name: "FK_SeminarPostHistoryVersion_Seminar_Seminar_Id", column: x => x.Seminar_Id, principalTable: "Seminar", principalColumn: "Id", onDelete: ReferentialAction.Cascade);
-            });
-
-            migrationBuilder.CreateIndex(name: "IX_Comment_PostId", table: "Comment", column: "PostId");
-
-            migrationBuilder.CreateIndex(name: "IX_LoginRecord_UserInfoId", table: "LoginRecord", column: "UserInfoId");
-
-            migrationBuilder.CreateIndex(name: "IX_Post_CategoryId", table: "Post", column: "CategoryId");
-
-            migrationBuilder.CreateIndex(name: "IX_PostAccessRecord_PostId", table: "PostAccessRecord", column: "PostId");
-
-            migrationBuilder.CreateIndex(name: "IX_PostHistoryVersion_CategoryId", table: "PostHistoryVersion", column: "CategoryId");
-
-            migrationBuilder.CreateIndex(name: "IX_PostHistoryVersion_PostId", table: "PostHistoryVersion", column: "PostId");
-
-            migrationBuilder.CreateIndex(name: "IX_SeminarPost_Post_Id", table: "SeminarPost", column: "Post_Id");
-
-            migrationBuilder.CreateIndex(name: "IX_SeminarPostHistoryVersion_PostHistoryVersion_Id", table: "SeminarPostHistoryVersion", column: "PostHistoryVersion_Id");
-        }
-
-        protected override void Down(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.DropTable(name: "Broadcast");
-
-            migrationBuilder.DropTable(name: "Comment");
-
-            migrationBuilder.DropTable(name: "Contacts");
-
-            migrationBuilder.DropTable(name: "Donate");
-
-            migrationBuilder.DropTable(name: "FastShare");
-
-            migrationBuilder.DropTable(name: "InternalMessage");
-
-            migrationBuilder.DropTable(name: "Issue");
-
-            migrationBuilder.DropTable(name: "LeaveMessage");
-
-            migrationBuilder.DropTable(name: "Links");
-
-            migrationBuilder.DropTable(name: "LoginRecord");
-
-            migrationBuilder.DropTable(name: "Menu");
-
-            migrationBuilder.DropTable(name: "Misc");
-
-            migrationBuilder.DropTable(name: "Notice");
-
-            migrationBuilder.DropTable(name: "PostAccessRecord");
-
-            migrationBuilder.DropTable(name: "SearchDetails");
-
-            migrationBuilder.DropTable(name: "SeminarPost");
-
-            migrationBuilder.DropTable(name: "SeminarPostHistoryVersion");
-
-            migrationBuilder.DropTable(name: "SystemSetting");
-
-            migrationBuilder.DropTable(name: "UserInfo");
-
-            migrationBuilder.DropTable(name: "PostHistoryVersion");
-
-            migrationBuilder.DropTable(name: "Seminar");
-
-            migrationBuilder.DropTable(name: "Post");
-
-            migrationBuilder.DropTable(name: "Category");
-        }
-    }
-}

+ 0 - 29
src/Masuit.MyBlogs.Core/Models/DTO/ContactsInputDto.cs

@@ -1,29 +0,0 @@
-using Masuit.MyBlogs.Core.Models.Entity;
-using Masuit.MyBlogs.Core.Models.Enum;
-using System.ComponentModel.DataAnnotations;
-
-namespace Masuit.MyBlogs.Core.Models.DTO
-{
-    /// <summary>
-    /// 联系方式输入模型
-    /// </summary>
-    public class ContactsInputDto : BaseEntity
-    {
-        public ContactsInputDto()
-        {
-            Status = Status.Available;
-        }
-
-        /// <summary>
-        /// 标题
-        /// </summary>
-        [Required(ErrorMessage = "标题不能为空"), MaxLength(255, ErrorMessage = "标题最长支持255个字符"), MinLength(4, ErrorMessage = "标题至少4个字")]
-        public string Title { get; set; }
-
-        /// <summary>
-        /// URL
-        /// </summary>
-        [Required(ErrorMessage = "URL不能为空"), MaxLength(255, ErrorMessage = "URL最长支持255个字符")]
-        public string Url { get; set; }
-    }
-}

+ 0 - 18
src/Masuit.MyBlogs.Core/Models/DTO/ContactsOutputDto.cs

@@ -1,18 +0,0 @@
-namespace Masuit.MyBlogs.Core.Models.DTO
-{
-    /// <summary>
-    /// 联系方式输出模型
-    /// </summary>
-    public class ContactsOutputDto : BaseDto
-    {
-        /// <summary>
-        /// 标题
-        /// </summary>
-        public string Title { get; set; }
-
-        /// <summary>
-        /// URL
-        /// </summary>
-        public string Url { get; set; }
-    }
-}

+ 0 - 31
src/Masuit.MyBlogs.Core/Models/Entity/Contacts.cs

@@ -1,31 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using Masuit.MyBlogs.Core.Models.Entity;
-using Masuit.MyBlogs.Core.Models.Enum;
-
-namespace Masuit.MyBlogs.Core.Models.Entity
-{
-    /// <summary>
-    /// 联系方式
-    /// </summary>
-    [Table("Contacts")]
-    public class Contacts : BaseEntity
-    {
-        public Contacts()
-        {
-            Status = Status.Available;
-        }
-
-        /// <summary>
-        /// 标题
-        /// </summary>
-        [Required(ErrorMessage = "标题不能为空")]
-        public string Title { get; set; }
-
-        /// <summary>
-        /// URL
-        /// </summary>
-        [Required(ErrorMessage = "URL不能为空")]
-        public string Url { get; set; }
-    }
-}

+ 0 - 23
src/Masuit.MyBlogs.Core/Models/RequestModel/PageFilter.cs

@@ -1,23 +0,0 @@
-namespace Masuit.MyBlogs.Core.Models.RequestModel
-{
-    /// <summary>
-    /// 分页筛选
-    /// </summary>
-    public class PageFilter
-    {
-        /// <summary>
-        /// 第几页
-        /// </summary>
-        public int Page { get; set; }
-
-        /// <summary>
-        /// 页大小
-        /// </summary>
-        public int Size { get; set; }
-
-        /// <summary>
-        /// 关键词
-        /// </summary>
-        public string Kw { get; set; }
-    }
-}

+ 0 - 4
src/Masuit.MyBlogs.Core/Models/ViewModel/PageFootViewModel.cs

@@ -12,9 +12,5 @@ namespace Masuit.MyBlogs.Core.Models.ViewModel
         /// 友情链接
         /// </summary>
         public IList<LinksOutputDto> Links { get; set; }
-        /// <summary>
-        /// 联系方式
-        /// </summary>
-        public IList<ContactsOutputDto> Contacts { get; set; }
     }
 }

+ 20 - 30
src/Masuit.MyBlogs.Core/Views/Misc/About.cshtml

@@ -54,7 +54,7 @@
         <div class="col-md-10">
             <table class="table-responsive table-condensed">
                 <tr>
-                    <td>江湖名号:</td>
+                    <td style="width: 100px">江湖名号:</td>
                     <td>懒得勤快</td>
                 </tr>
                 <tr>
@@ -71,9 +71,15 @@
                         自由之思想,独立之人格。跟着靠谱的人,干牛逼的事!
                     </td>
                 </tr>
+                <tr>
+                    <td>建站宗旨:</td>
+                    <td>
+                        全栈开发者,互联网分享精神!勤于发现,乐于分享!山外青山楼外楼,比上不足比下有余;规则是用来打破的,王道是用来颠覆的!
+                    </td>
+                </tr>
             </table>
         </div>
-        <div class="page-header">
+        <div class="col-md-12 page-header">
             <h2 class="size24 inline">
                 自序
                 <small>
@@ -103,9 +109,7 @@
             <button class="btn btn-success">CSS</button>
             <button class="btn btn-danger">NoSql</button>
             <button class="btn btn-default">C#</button>
-            <button class="btn btn-info">JavaEE</button>
             <button class="btn btn-primary">DotNet</button>
-            <button class="btn btn-success">NodeJS</button>
             <button class="btn btn-danger">Redis</button>
             <button class="btn btn-default">MySql</button>
             <button class="btn btn-info">git</button>
@@ -118,18 +122,14 @@
             <button class="btn btn-default">大数据</button>
             <button class="btn btn-info">操作系统</button>
             <button class="btn btn-danger">云计算</button>
-            <button class="btn btn-primary">数码硬件</button>
+            <button class="btn btn-primary">数码硬件DIY</button>
             <button class="btn btn-success">软件绿化</button>
             <button class="btn btn-default">服务器</button>
-            <button class="btn btn-info">自动化运维</button>
             <button class="btn btn-danger">分布式</button>
             <button class="btn btn-primary">微服务</button>
-            <button class="btn btn-success">区块链</button>
             <button class="btn btn-default">自然语言</button>
             <button class="btn btn-info">搜索引擎</button>
-            <button class="btn btn-danger">金融科技</button>
-            <button class="btn btn-primary">数字货币</button>
-            <button class="btn btn-success">区块链</button>
+            <button class="btn btn-danger">科学上网</button>
         </div>
     </div>
     <div class="row margin-top10">
@@ -138,9 +138,6 @@
         </div>
         <div class="col-md-12" style="line-height: 40px;">
             <button class="btn btn-danger">VisualStudio</button>
-            <button class="btn btn-default">eclipse</button>
-            <button class="btn btn-success">myeclipse</button>
-            <button class="btn btn-info">IntelliJ idea</button>
             <button class="btn btn-primary">Photoshop</button>
             <button class="btn btn-success">Navicat</button>
             <button class="btn btn-info">VS Code</button>
@@ -149,24 +146,20 @@
             <button class="btn btn-danger">RedisDesktopManager</button>
             <button class="btn btn-default">chrome</button>
             <button class="btn btn-info">git</button>
-            <button class="btn btn-primary">nginx</button>
+            <button class="btn btn-primary">telegram</button>
             <button class="btn btn-danger">SVN</button>
             <button class="btn btn-success">Internet Download Manager</button>
             <button class="btn btn-default">TeamViewer</button>
             <button class="btn btn-info">github</button>
-            <button class="btn btn-primary">npm</button>
-            <button class="btn btn-danger">gitbook</button>
             <button class="btn btn-info">bilibili</button>
             <button class="btn btn-success">stackoverflow</button>
-            <button class="btn btn-default">WebStorm</button>
-            <button class="btn btn-info">google</button>
-            <button class="btn btn-primary">bing</button>
-            <button class="btn btn-danger">gitbook</button>
-            <button class="btn btn-success">stackoverflow</button>
-            <button class="btn btn-default">WebStorm</button>
             <button class="btn btn-info">google</button>
-            <button class="btn btn-primary">JetBrains Rider</button>
             <button class="btn btn-danger">Postman</button>
+            <button class="btn btn-success">PanDownload</button>
+            <button class="btn btn-info">BlueStack</button>
+            <button class="btn btn-primary">Shadowsocks</button>
+            <button class="btn btn-default">ShadowsocksR</button>
+            <button class="btn btn-danger">v2ray</button>
         </div>
     </div>
     <div class="row margin-top10">
@@ -206,13 +199,10 @@
             <h2 class="size24 inline">联系博主</h2>
         </div>
         <div class="col-md-12" style="line-height: 40px;">
-            @{
-                var contacts = footer.Contacts;
-                foreach (ContactsOutputDto c in contacts)
-                {
-                    <a class="btn btn-info" href="@c.Url">@c.Title</a>
-                }
-            }
+            <a class="btn btn-info" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&amp;[email protected]" target="_blank">企业邮箱</a>
+            <a class="btn btn-info" href="https://github.com/ldqk" target="_blank">GitHub</a>
+            <a class="btn btn-info" href="http://wpa.qq.com/msgrd?v=3&amp;uin=3444764617&amp;site=qq&amp;menu=yes" target="_blank">腾讯QQ</a>
+            <a class="btn btn-info" href="https://t.me/ldqk0" target="_blank">Telegram</a>
         </div>
     </div>
     <!--PC和WAP自适应版-->

+ 0 - 10
src/Masuit.MyBlogs.Core/Views/Shared/_Layout.cshtml

@@ -292,16 +292,6 @@
                         }
                         <a asp-controller="Links" asp-action="Index">更多链接>></a>
                     </section>
-                    <section>
-                        联系站长:
-                        @{
-                            var contacts = footer.Contacts;
-                            foreach (ContactsOutputDto c in contacts)
-                            {
-                                <a href="@c.Url" target="_blank">@c.Title</a><span> | </span>
-                            }
-                        }
-                    </section>
                     <section class="copy">
                         @Html.Raw(CommonHelper.SystemSettings["Copyright"])
                     </section>

+ 0 - 9
src/Masuit.MyBlogs.Core/wwwroot/ng-views/app/route.config.js

@@ -268,15 +268,6 @@ myApp.config(["$stateProvider", "$urlRouterProvider", "$locationProvider",
 					return $ocLazyLoad.load([cpath + "/links.js"]);
 				}]
 			}
-		}).state("contact", {
-			url: "/contact",
-			templateUrl: vpath + "/contact.html",
-			controller: "contact as list",
-			resolve: {
-				deps: ["$ocLazyLoad", function($ocLazyLoad) {
-					return $ocLazyLoad.load([cpath + "/contact.js"]);
-				}]
-			}
 		}).state("seminar", {
 			url: "/seminar",
 			templateUrl: vpath + "/seminar.html",

+ 0 - 139
src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/contact.js

@@ -1,139 +0,0 @@
-myApp.controller("contact", ["$scope", "$http", "NgTableParams", function ($scope, $http, NgTableParams) {
-	window.hub.stop();
-	var self = this;
-	var source = [];
-	$scope.loading();
-	$scope.paginationConf = {
-		currentPage: $scope.currentPage ? $scope.currentPage : 1,
-		itemsPerPage: 10,
-		pagesLength: 25,
-		perPageOptions: [1, 5, 10, 15, 20, 30, 40, 50, 100, 200],
-		rememberPerPage: 'perPageItems',
-		onChange: function () {
-			self.GetPageData($scope.paginationConf.currentPage, $scope.paginationConf.itemsPerPage);
-		}
-	};
-	this.GetPageData = function (page, size) {
-		$scope.loading();
-		$http.post("/contact/getpagedata", {
-			page,
-			size
-		}).then(function (res) {
-			$scope.paginationConf.currentPage = page;
-			$scope.paginationConf.totalItems = res.data.TotalCount;
-			$("div[ng-table-pagination]").remove();
-			self.tableParams = new NgTableParams({
-				count: 50000
-			}, {
-					filterDelay: 0,
-					dataset: res.data.Data
-				});
-			source = angular.copy(res.data.Data);
-			$scope.loadingDone();
-		});
-	};
-	self.del = function (row) {
-		swal({
-			title: "确认删除这条联系方式吗?",
-			text: row.Title,
-			showCancelButton: true,
-			confirmButtonColor: "#DD6B55",
-			confirmButtonText: "确定",
-			cancelButtonText: "取消",
-			showLoaderOnConfirm: true,
-			animation: true,
-			allowOutsideClick: false
-		}).then(function () {
-			$scope.request("/contact/delete", {
-				id: row.Id
-			}, function (data) {
-				window.notie.alert({
-					type: 1,
-					text: data.Message,
-					time: 4
-				});
-			});
-			_.remove(self.tableParams.settings().dataset, function (item) {
-				return row === item;
-			});
-			self.tableParams.reload().then(function (data) {
-				if (data.length === 0 && self.tableParams.total() > 0) {
-					self.tableParams.page(self.tableParams.page() - 1);
-					self.tableParams.reload();
-				}
-			});
-		}, function () {
-		}).catch(swal.noop);
-	}
-	self.cancel = function (row, rowForm) {
-		var originalRow = resetRow(row, rowForm);
-		angular.extend(row, originalRow);
-	};
-	self.save = function (row, rowForm) {
-		swal({
-			title: "确认修改" + row.Name + "地址为:",
-			text: row.Url,
-			showCancelButton: true,
-			confirmButtonColor: "#DD6B55",
-			confirmButtonText: "确定",
-			cancelButtonText: "取消",
-			showLoaderOnConfirm: true,
-			animation: true,
-			allowOutsideClick: false
-		}).then(function () {
-			$scope.request("/contact/edit", row, function (data) {
-				window.notie.alert({
-					type: 1,
-					text: data.Message,
-					time: 4
-				});
-				var originalRow = resetRow(row, rowForm);
-				angular.extend(originalRow, row);
-			});
-		}, function () {
-		}).catch(swal.noop);
-	};
-	function resetRow(row, rowForm) {
-		row.isEditing = false;
-		rowForm.$setPristine();
-		self.tableTracker.untrack(row);
-		return _.findWhere(source, function (r) {
-			return r.id === row.id;
-		});
-	}
-	$scope.add= function() {
-		swal({
-			title: '添加联系方式',
-			html:
-			'<input id="title" class="swal2-input" autofocus placeholder="联系方式">' +
-			'<input id="url" class="swal2-input" placeholder="地址">',
-			showCloseButton: true,
-			confirmButtonColor: "#DD6B55",
-			confirmButtonText: "确定",
-			cancelButtonText: "取消",
-			showLoaderOnConfirm: true,
-			animation: true,
-			allowOutsideClick: false,
-			preConfirm: function () {
-				return new Promise(function (resolve) {
-					$scope.request("/contact/add", {
-						Title: $('#title').val(),
-						Url: $('#url').val()
-					}, function (res) {
-						resolve(res);
-					});
-				});
-			}
-		}).then(function (result) {
-			if (result) {
-				if (result.Success) {
-					swal(result.Message, "", "success");
-					self.GetPageData($scope.paginationConf.currentPage, $scope.paginationConf.itemsPerPage);
-				} else {
-					swal(result.Message, "", "error");
-				}
-			}
-		}).catch(swal.noop);
-	}
-	$scope.loadingDone();
-}]);

ファイルの差分が大きいため隠しています
+ 0 - 0
src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/contact.min.js


+ 2 - 1
src/Masuit.MyBlogs.Core/wwwroot/ng-views/controllers/post.js

@@ -860,7 +860,8 @@ myApp.controller("category", ["$scope", "$http", "NgTableParams", function ($sco
 					});
 				} else {
 					$scope.request("/category/delete", {
-						id: row.Id
+						id: row.Id,
+						cid:result
 					}, function(data) {
 						swal({
 							type: 'success',

+ 2 - 9
src/Masuit.MyBlogs.Core/wwwroot/ng-views/template/sidebar-left.html

@@ -85,15 +85,8 @@
                 </li>
                 <li><a data-ui-sref-active="active" data-ui-sref="system-log" data-ng-click="mactrl.sidebarStat($event)">查看网站日志</a></li>
                 <li><a data-ui-sref-active="active" data-ui-sref="system-firewall" data-ng-click="mactrl.sidebarStat($event)">网站防火墙</a></li>
-                <li></li>
-                <li class="sub-menu">
-                    <a href="" toggle-submenu><i class="zmdi zmdi-trending-up"></i>网站资产管理</a>
-                    <ul>
-                        <li><a data-ui-sref-active="active" data-ui-sref="links" data-ng-click="mactrl.sidebarStat($event)">友情链接管理</a></li>
-                        <li><a data-ui-sref-active="active" data-ui-sref="contact" data-ng-click="mactrl.sidebarStat($event)">联系方式管理</a></li>
-                        <li><a data-ui-sref-active="active" data-ui-sref="email" data-ng-click="mactrl.sidebarStat($event)">邮件模版</a></li>
-                    </ul>
-                </li>
+                <li><a data-ui-sref-active="active" data-ui-sref="links" data-ng-click="mactrl.sidebarStat($event)">友情链接管理</a></li>
+                <li><a data-ui-sref-active="active" data-ui-sref="email" data-ng-click="mactrl.sidebarStat($event)">邮件模版</a></li>
             </ul>
         </li>
         <li data-ui-sref-active="active">

+ 0 - 49
src/Masuit.MyBlogs.Core/wwwroot/ng-views/views/contact.html

@@ -1,49 +0,0 @@
-<div class="row">
-    <div class="btn-group">
-        <button class="btn btn-danger waves-effect" ng-click="add()">
-            <span class="glyphicon glyphicon-plus"></span>
-        </button>
-        <button class="btn btn-info waves-effect" ng-click="list.GetPageData(paginationConf.currentPage, paginationConf.itemsPerPage);">
-            <span class="glyphicon glyphicon-refresh"></span>
-        </button>
-    </div>
-    <table ng-table="list.tableParams" class="table table-bordered table-hover table-condensed" ng-form="list.tableForm" disable-filter="list.isAdding" tracked-table="list.tableTracker">
-        <tr ng-repeat="row in $data" ng-form="rowForm" tracked-table-row="row">
-            <td title="'联系方式'" filter="{Title: 'text'}" sortable="'Title'" ng-switch="row.isEditing" ng-class="Title.$dirty ? 'bg-warning' : ''" ng-form="Title" tracked-table-cell>
-                <span ng-switch-default>{{row.Title}}</span>
-                <div ng-class="Title.$invalid && Title.$dirty ? 'has-error' : ''" ng-switch-when="true">
-                    <div class="fg-line">
-                        <input type="text" name="name" ng-model="row.Title" class="form-control input-sm" required/>
-                    </div>
-                </div>
-            </td>
-            <td title="'链接'" filter="{Url: 'text'}" sortable="'Url'" ng-switch="row.isEditing" ng-class="Url.$dirty ? 'bg-warning' : ''" ng-form="Url" tracked-table-cell>
-                <span ng-switch-default>
-                    <a href="{{row.Url}}" target="_blank">{{row.Url}}</a>
-                </span>
-                <div ng-class="Url.$invalid && Url.$dirty ? 'has-error' : ''" ng-switch-when="true">
-                    <div class="fg-line">
-                        <input type="text" name="name" ng-model="row.Url" class="form-control input-sm" required/>
-                    </div>
-                </div>
-            </td>
-            <td title="'操作'" style="width: 120px;">
-                <div class="btn-group">
-                    <button class="btn btn-primary btn-sm waves-effect" ng-click="list.save(row, rowForm)" ng-if="row.isEditing" ng-disabled="rowForm.$pristine || rowForm.$invalid">
-                        <span class="glyphicon glyphicon-ok"></span>
-                    </button>
-                    <button class="btn btn-default btn-sm waves-effect" ng-click="list.cancel(row, rowForm)" ng-if="row.isEditing">
-                        <span class="glyphicon glyphicon-remove"></span>
-                    </button>
-                    <button class="btn btn-default btn-sm waves-effect" ng-click="row.isEditing = true" ng-if="!row.isEditing">
-                        <i class="icon-pencil"></i>
-                    </button>
-                    <button class="btn btn-danger btn-sm waves-effect" ng-click="list.del(row)" ng-if="!row.isEditing">
-                        <i class="icon-cross"></i>
-                    </button>
-                </div>
-            </td>
-        </tr>
-    </table>
-    <tm-pagination conf="paginationConf"></tm-pagination>
-</div>

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません