style: 修改目录

This commit is contained in:
陈淳
2023-03-20 18:59:34 +08:00
parent f4cdeb3dc5
commit 5a4ac549f6
65 changed files with 316 additions and 112 deletions

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.BBS.Domain.Shared.Forum.EnumClasses
{
public enum QueryDiscussTypeEnum
{
New,
Suggest,
Host
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.BBS.Domain.Shared.Forum.Etos
{
public class SeeDiscussEventArgs
{
public long DiscussId { get; set; }
public int OldSeeNum { get; set; }
}
}

View File

@@ -0,0 +1,255 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Data.DataSeeds;
using Yi.Framework.Ddd.Repositories;
using Yi.RBAC.Domain.Identity.Entities;
using Yi.RBAC.Domain.Shared.Identity.EnumClasses;
namespace Yi.BBS.Domain.DataSeed
{
[AppService(typeof(IDataSeed))]
public class BbsMenuDataSeed : AbstractDataSeed<MenuEntity>
{
public BbsMenuDataSeed(IRepository<MenuEntity> repository) : base(repository)
{
}
public override async Task<bool> IsInvoker()
{
return !await _repository.IsAnyAsync(x => x.MenuName == "BBS");
}
public override List<MenuEntity> GetSeedData()
{
List<MenuEntity> entities = new List<MenuEntity>();
//BBS
MenuEntity bbs = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "BBS",
MenuType = MenuTypeEnum.Catalogue,
Router = "/bbs",
IsShow = true,
IsLink = false,
MenuIcon = "international",
OrderNum = 97,
ParentId = 0,
IsDeleted = false
};
entities.Add(bbs);
//文章管理
MenuEntity article = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "文章管理",
PermissionCode = "bbs:article:list",
MenuType = MenuTypeEnum.Menu,
Router = "article",
IsShow = true,
IsLink = false,
IsCache = true,
Component = "bbs/article/index",
MenuIcon = "education",
OrderNum = 100,
ParentId = bbs.Id,
IsDeleted = false
};
entities.Add(article);
MenuEntity articleQuery = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "文章查询",
PermissionCode = "bbs:article:query",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = article.Id,
IsDeleted = false
};
entities.Add(articleQuery);
MenuEntity articleAdd = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "文章新增",
PermissionCode = "bbs:article:add",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = article.Id,
IsDeleted = false
};
entities.Add(articleAdd);
MenuEntity articleEdit = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "文章修改",
PermissionCode = "bbs:article:edit",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = article.Id,
IsDeleted = false
};
entities.Add(articleEdit);
MenuEntity articleRemove = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "文章删除",
PermissionCode = "bbs:article:remove",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = article.Id,
IsDeleted = false
};
entities.Add(articleRemove);
//主题管理
MenuEntity discuss = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "主题管理",
PermissionCode = "bbs:discuss:list",
MenuType = MenuTypeEnum.Menu,
Router = "discuss",
IsShow = true,
IsLink = false,
IsCache = true,
Component = "bbs/discuss/index",
MenuIcon = "education",
OrderNum = 100,
ParentId = bbs.Id,
IsDeleted = false
};
entities.Add(discuss);
MenuEntity discussQuery = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "主题查询",
PermissionCode = "bbs:discuss:query",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = discuss.Id,
IsDeleted = false
};
entities.Add(discussQuery);
MenuEntity discussAdd = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "主题新增",
PermissionCode = "bbs:discuss:add",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = discuss.Id,
IsDeleted = false
};
entities.Add(discussAdd);
MenuEntity discussEdit = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "主题修改",
PermissionCode = "bbs:discuss:edit",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = discuss.Id,
IsDeleted = false
};
entities.Add(discussEdit);
MenuEntity discussRemove = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "主题删除",
PermissionCode = "bbs:discuss:remove",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = discuss.Id,
IsDeleted = false
};
entities.Add(discussRemove);
//板块管理
MenuEntity plate = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "板块管理",
PermissionCode = "bbs:plate:list",
MenuType = MenuTypeEnum.Menu,
Router = "plate",
IsShow = true,
IsLink = false,
IsCache = true,
Component = "bbs/plate/index",
MenuIcon = "education",
OrderNum = 100,
ParentId = bbs.Id,
IsDeleted = false
};
entities.Add(plate);
MenuEntity plateQuery = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "板块查询",
PermissionCode = "bbs:plate:query",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = plate.Id,
IsDeleted = false
};
entities.Add(plateQuery);
MenuEntity plateAdd = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "板块新增",
PermissionCode = "bbs:plate:add",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = plate.Id,
IsDeleted = false
};
entities.Add(plateAdd);
MenuEntity plateEdit = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "板块修改",
PermissionCode = "bbs:plate:edit",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = plate.Id,
IsDeleted = false
};
entities.Add(plateEdit);
MenuEntity plateRemove = new MenuEntity()
{
Id = SnowflakeHelper.NextId,
MenuName = "板块删除",
PermissionCode = "bbs:plate:remove",
MenuType = MenuTypeEnum.Component,
OrderNum = 100,
ParentId = plate.Id,
IsDeleted = false
};
entities.Add(plateRemove);
//默认值
entities.ForEach(m =>
{
m.IsDeleted = false;
m.State = true;
});
return entities;
}
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cike.EventBus.EventHandlerAbstracts;
using Yi.BBS.Domain.Forum.Entities;
using Yi.BBS.Domain.Shared.Forum.Etos;
using Yi.Framework.Ddd.Repositories;
using Yi.RBAC.Domain.Shared.Identity.Etos;
namespace Yi.BBS.Domain.Forum.Event
{
public class SeeDiscussEventHandler : IDistributedEventHandler<SeeDiscussEventArgs>
{
private IRepository<DiscussEntity> _repository;
public SeeDiscussEventHandler(IRepository<DiscussEntity> repository)
{
_repository = repository;
}
public async Task HandlerAsync(SeeDiscussEventArgs eventData)
{
var entity= await _repository.GetByIdAsync(eventData.DiscussId);
if (entity is not null) {
entity.SeeNum += 1;
await _repository.UpdateAsync(entity);
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@@ -1,28 +0,0 @@
3-5
一周一次
实现涂膜功能
1数据存储Crud
2后台线程任务调度
3plc通信交互IM工厂
4定时任务界面管控
5signlr开发
6授权鉴权
7用户角色菜单模块
8配置文件统一标准化
9规范问题
10动态api
11发布订阅
12resful
13dto注释
14代码中文
15种子数据
1job任务调度的模式可以在if上的改
2CrudEntityServiceBase考虑复用的话sqlsugar这块就不用动了、仓储、工作单元、过滤器
3IOptionsWritable ,直接可以复用
4事件是否需要需要的话用哪个
5动态api是否需要
6IM,IVarReader中的IDataChannel工厂
6ISignal
7微软日志扩展这块是否考虑封装出来还是直接提供微软日志的扩展我们提供模板就可以了

View File

@@ -1,28 +0,0 @@
3-5
一周一次
实现涂膜功能
1数据存储Crud
2后台线程任务调度
3plc通信交互IM工厂
4定时任务界面管控
5signlr开发
6授权鉴权
7用户角色菜单模块
8配置文件统一标准化
9规范问题
10动态api
11发布订阅
12resful
13dto注释
14代码中文
15种子数据
1job任务调度的模式可以在if上的改
2CrudEntityServiceBase考虑复用的话sqlsugar这块就不用动了、仓储、工作单元、过滤器
3IOptionsWritable ,直接可以复用
4事件是否需要需要的话用哪个
5动态api是否需要
6IM,IVarReader中的IDataChannel工厂
6ISignal
7微软日志扩展这块是否考虑封装出来还是直接提供微软日志的扩展我们提供模板就可以了

View File

@@ -1,28 +0,0 @@
3-5
一周一次
实现涂膜功能
1数据存储Crud
2后台线程任务调度
3plc通信交互IM工厂
4定时任务界面管控
5signlr开发
6授权鉴权
7用户角色菜单模块
8配置文件统一标准化
9规范问题
10动态api
11发布订阅
12resful
13dto注释
14代码中文
15种子数据
1job任务调度的模式可以在if上的改
2CrudEntityServiceBase考虑复用的话sqlsugar这块就不用动了、仓储、工作单元、过滤器
3IOptionsWritable ,直接可以复用
4事件是否需要需要的话用哪个
5动态api是否需要
6IM,IVarReader中的IDataChannel工厂
6ISignal
7微软日志扩展这块是否考虑封装出来还是直接提供微软日志的扩展我们提供模板就可以了

View File

@@ -1,28 +0,0 @@
3-5
一周一次
实现涂膜功能
1数据存储Crud
2后台线程任务调度
3plc通信交互IM工厂
4定时任务界面管控
5signlr开发
6授权鉴权
7用户角色菜单模块
8配置文件统一标准化
9规范问题
10动态api
11发布订阅
12resful
13dto注释
14代码中文
15种子数据
1job任务调度的模式可以在if上的改
2CrudEntityServiceBase考虑复用的话sqlsugar这块就不用动了、仓储、工作单元、过滤器
3IOptionsWritable ,直接可以复用
4事件是否需要需要的话用哪个
5动态api是否需要
6IM,IVarReader中的IDataChannel工厂
6ISignal
7微软日志扩展这块是否考虑封装出来还是直接提供微软日志的扩展我们提供模板就可以了

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB