feat:基于furion搭建
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
global using Yi.Framework.Core.Attributes;
|
||||
global using Yi.Framework.Core.Helper;
|
||||
global using Yi.Framework.Core.Model;
|
||||
global using Yi.Framework.Core.Exceptions;
|
||||
@@ -1,30 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Argee
|
||||
{
|
||||
public class AgreeDto
|
||||
{
|
||||
public AgreeDto(bool isAgree)
|
||||
{
|
||||
IsAgree = isAgree;
|
||||
if (isAgree)
|
||||
{
|
||||
|
||||
Message = "点赞成功,点赞+1";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Message = "取消点赞,点赞-1";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public bool IsAgree { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<DocumentationFile>./$(AssemblyName)SwaggerDoc.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\rbac\Yi.RBAC.Application.Contracts\Yi.RBAC.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Yi.BBS.Domain.Shared\Yi.BBS.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="Yi.BBS.Application.ContractsSwaggerDoc.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,27 +0,0 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StartupModules;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.BBS.Domain.Shared;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiBBSDomainSharedModule)
|
||||
)]
|
||||
public class YiBBSApplicationContractsModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Cike.AutoWebApi.Setting;
|
||||
using Yi.BBS.Application.Contracts.Exhibition.Dtos.Argee;
|
||||
using Yi.BBS.Domain.Exhibition.Entities;
|
||||
using Yi.BBS.Domain.Forum.Entities;
|
||||
using Yi.Framework.Core.CurrentUsers;
|
||||
using Yi.Framework.Ddd.Repositories;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
using Yi.Framework.Uow;
|
||||
|
||||
namespace Yi.BBS.Application.Exhibition
|
||||
{
|
||||
/// <summary>
|
||||
/// 点赞功能
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class AgreeService : ApplicationService, IApplicationService, IAutoApiService
|
||||
{
|
||||
|
||||
[Autowired]
|
||||
private IRepository<AgreeEntity> _repository { get; set; }
|
||||
|
||||
[Autowired]
|
||||
private IRepository<DiscussEntity> _discssRepository { get; set; }
|
||||
[Autowired]
|
||||
private ICurrentUser _currentUser { get; set; }
|
||||
|
||||
[Autowired]
|
||||
private IUnitOfWorkManager _unitOfWorkManager { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点赞,返回true为点赞+1,返回false为点赞-1
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<AgreeDto> PostOperateAsync(long discussId)
|
||||
{
|
||||
var entity = await _repository.GetFirstAsync(x => x.DiscussId == discussId && x.CreatorId == _currentUser.Id);
|
||||
//判断是否已经点赞过
|
||||
if (entity is null)
|
||||
{
|
||||
using (var uow = _unitOfWorkManager.CreateContext())
|
||||
{
|
||||
//没点赞过,添加记录即可,,修改总点赞数量
|
||||
await _repository.InsertAsync(new AgreeEntity(discussId));
|
||||
var discussEntity = await _discssRepository.GetByIdAsync(discussId);
|
||||
if (discussEntity is null)
|
||||
{
|
||||
throw new UserFriendlyException("主题为空");
|
||||
}
|
||||
discussEntity.AgreeNum += 1;
|
||||
await _discssRepository.UpdateAsync(discussEntity);
|
||||
uow.Commit();
|
||||
}
|
||||
return new AgreeDto(true);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
using (var uow = _unitOfWorkManager.CreateContext())
|
||||
{
|
||||
//点赞过,删除即可,修改总点赞数量
|
||||
await _repository.DeleteByIdAsync(entity.Id);
|
||||
var discussEntity = await _discssRepository.GetByIdAsync(discussId);
|
||||
if (discussEntity is null)
|
||||
{
|
||||
throw new UserFriendlyException("主题为空");
|
||||
}
|
||||
discussEntity.AgreeNum -= 1;
|
||||
await _discssRepository.UpdateAsync(discussEntity);
|
||||
uow.Commit();
|
||||
}
|
||||
|
||||
return new AgreeDto(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<DocumentationFile>./$(AssemblyName)SwaggerDoc.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Auth.JwtBearer\Yi.Framework.Auth.JwtBearer.csproj" />
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Uow\Yi.Framework.Uow.csproj" />
|
||||
<ProjectReference Include="..\..\rbac\Yi.RBAC.Application\Yi.RBAC.Application.csproj" />
|
||||
<ProjectReference Include="..\Yi.BBS.Application.Contracts\Yi.BBS.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Yi.BBS.Domain\Yi.BBS.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="Yi.BBS.ApplicationSwaggerDoc.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,36 +0,0 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StartupModules;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts;
|
||||
using Yi.Framework.Auth.JwtBearer;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Data;
|
||||
using Yi.Framework.Ddd;
|
||||
using Yi.BBS.Domain;
|
||||
using Yi.RBAC.Application;
|
||||
|
||||
namespace Yi.BBS.Application
|
||||
{
|
||||
[DependsOn(
|
||||
|
||||
typeof(YiBBSApplicationContractsModule),
|
||||
typeof(YiBBSDomainModule),
|
||||
typeof(YiFrameworkAuthJwtBearerModule),
|
||||
typeof(YiRBACApplicationModule)
|
||||
)]
|
||||
public class YiBBSApplicationModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
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 DiscussPermissionTypeEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// 默认:公开
|
||||
/// </summary>
|
||||
Public = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 仅自己可见
|
||||
/// </summary>
|
||||
Oneself,
|
||||
|
||||
/// <summary>
|
||||
/// 部分用户可见
|
||||
/// </summary>
|
||||
User
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
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
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
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; }
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd\Yi.Framework.Ddd.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,27 +0,0 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StartupModules;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Ddd;
|
||||
|
||||
namespace Yi.BBS.Domain.Shared
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkDddModule)
|
||||
)]
|
||||
public class YiBBSDomainSharedModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
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.Setting.Entities;
|
||||
using Yi.RBAC.Domain.Shared.Identity.EnumClasses;
|
||||
|
||||
namespace Yi.BBS.Domain.DataSeed
|
||||
{
|
||||
[AppService(typeof(IDataSeed))]
|
||||
public class BbsConfigDataSeed : AbstractDataSeed<ConfigEntity>
|
||||
{
|
||||
public BbsConfigDataSeed(IRepository<ConfigEntity> repository) : base(repository)
|
||||
{
|
||||
}
|
||||
|
||||
public override async Task<bool> IsInvoker()
|
||||
{
|
||||
return !await _repository.IsAnyAsync(x => x.ConfigKey == "bbs.site.name");
|
||||
}
|
||||
public override List<ConfigEntity> GetSeedData()
|
||||
{
|
||||
List<ConfigEntity> entities = new List<ConfigEntity>()
|
||||
{
|
||||
new ConfigEntity { Id = SnowflakeHelper.NextId, ConfigKey = "bbs.site.name", ConfigValue = "Yi意社区", ConfigName = "bbs站点名称" },
|
||||
new ConfigEntity { Id = SnowflakeHelper.NextId, ConfigKey = "bbs.site.author", ConfigValue = "橙子", ConfigName = "bbs站点作者" },
|
||||
new ConfigEntity { Id = SnowflakeHelper.NextId, ConfigKey = "bbs.site.icp", ConfigValue = "2023 意社区 | 赣ICP备xxxxxx号-4", ConfigName = "bbs备案号" },
|
||||
new ConfigEntity { Id = SnowflakeHelper.NextId, ConfigKey = "bbs.site.bottom", ConfigValue = "YiFramework意框架", ConfigName = "bbs底部信息" },
|
||||
};
|
||||
return entities;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,326 +0,0 @@
|
||||
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 comment = new MenuEntity()
|
||||
{
|
||||
Id = SnowflakeHelper.NextId,
|
||||
MenuName = "评论管理",
|
||||
PermissionCode = "bbs:comment:list",
|
||||
MenuType = MenuTypeEnum.Menu,
|
||||
Router = "comment",
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
IsCache = true,
|
||||
Component = "bbs/comment/index",
|
||||
MenuIcon = "education",
|
||||
OrderNum = 100,
|
||||
ParentId = bbs.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(comment);
|
||||
|
||||
MenuEntity commentQuery = new MenuEntity()
|
||||
{
|
||||
Id = SnowflakeHelper.NextId,
|
||||
MenuName = "评论查询",
|
||||
PermissionCode = "bbs:comment:query",
|
||||
MenuType = MenuTypeEnum.Component,
|
||||
OrderNum = 100,
|
||||
ParentId = comment.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(commentQuery);
|
||||
|
||||
MenuEntity commentAdd = new MenuEntity()
|
||||
{
|
||||
Id = SnowflakeHelper.NextId,
|
||||
MenuName = "评论新增",
|
||||
PermissionCode = "bbs:comment:add",
|
||||
MenuType = MenuTypeEnum.Component,
|
||||
OrderNum = 100,
|
||||
ParentId = comment.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(commentAdd);
|
||||
|
||||
MenuEntity commentEdit = new MenuEntity()
|
||||
{
|
||||
Id = SnowflakeHelper.NextId,
|
||||
MenuName = "评论修改",
|
||||
PermissionCode = "bbs:comment:edit",
|
||||
MenuType = MenuTypeEnum.Component,
|
||||
OrderNum = 100,
|
||||
ParentId = comment.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(commentEdit);
|
||||
|
||||
MenuEntity commentRemove = new MenuEntity()
|
||||
{
|
||||
Id = SnowflakeHelper.NextId,
|
||||
MenuName = "评论删除",
|
||||
PermissionCode = "bbs:comment:remove",
|
||||
MenuType = MenuTypeEnum.Component,
|
||||
OrderNum = 100,
|
||||
ParentId = comment.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(commentRemove);
|
||||
|
||||
|
||||
//文章管理
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Data.Auditing;
|
||||
using Yi.Framework.Data.Entities;
|
||||
using Yi.Framework.Ddd.Entities;
|
||||
|
||||
namespace Yi.BBS.Domain.Exhibition.Entities
|
||||
{
|
||||
[SugarTable("Agree")]
|
||||
public class AgreeEntity : IEntity<long>, ICreationAuditedObject
|
||||
{
|
||||
public AgreeEntity()
|
||||
{
|
||||
}
|
||||
|
||||
public AgreeEntity(long discussId)
|
||||
{
|
||||
DiscussId = discussId;
|
||||
}
|
||||
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; } = SnowflakeHelper.NextId;
|
||||
public DateTime CreationTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主题id
|
||||
/// </summary>
|
||||
public long DiscussId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建者
|
||||
/// </summary>
|
||||
public long? CreatorId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<DocumentationFile>./$(AssemblyName)SwaggerDoc.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Data\Yi.Framework.Data.csproj" />
|
||||
<ProjectReference Include="..\..\rbac\Yi.RBAC.Domain\Yi.RBAC.Domain.csproj" />
|
||||
<ProjectReference Include="..\Yi.BBS.Domain.Shared\Yi.BBS.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="Yi.BBS.DomainSwaggerDoc.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,29 +0,0 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StartupModules;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Data;
|
||||
using Yi.BBS.Domain.Shared;
|
||||
|
||||
namespace Yi.BBS.Domain
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiBBSDomainSharedModule)
|
||||
)]
|
||||
public class YiBBSDomainModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Core.Sqlsugar\Yi.Framework.Core.Sqlsugar.csproj" />
|
||||
<ProjectReference Include="..\..\rbac\Yi.RBAC.Sqlsugar\Yi.RBAC.Sqlsugar.csproj" />
|
||||
<ProjectReference Include="..\Yi.BBS.Domain\Yi.BBS.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,32 +0,0 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StartupModules;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Core.Sqlsugar;
|
||||
using Yi.BBS.Domain;
|
||||
using Yi.RBAC.Sqlsugar;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Yi.BBS.Sqlsugar
|
||||
{
|
||||
[DependsOn(typeof(YiFrameworkCoreSqlsugarModule),
|
||||
typeof(YiBBSDomainModule),
|
||||
typeof(YiRBACSqlsugarModule))]
|
||||
public class YiBBSSqlsugarModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
//services.AddTransient<IStudentRepository, StudentRepository>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using AspNetCore.Microsoft.AspNetCore.Hosting;
|
||||
using Yi.Framework.Core.Autofac.Extensions;
|
||||
using Yi.Framework.Core.Autofac.Modules;
|
||||
using Yi.Framework.Core.Extensions;
|
||||
using Yi.BBS.Web;
|
||||
using Yi.Framework.Core.Module;
|
||||
using NLog.Extensions.Logging;
|
||||
using NLog;
|
||||
using SqlSugar;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.Services.AddLogging(builder => { builder.ClearProviders().AddNLog("nlog.config").SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); });
|
||||
Logger? _logger = LogManager.Setup().LoadConfigurationFromAssemblyResource(typeof(Program).Assembly).GetCurrentClassLogger();
|
||||
_logger.Info("-----( ¯ □ ¯ )YiFrameowrk框架启动-----");
|
||||
|
||||
builder.WebHost.UseStartUrlsServer(builder.Configuration);
|
||||
|
||||
builder.UseYiModules(typeof(YiBBSWebModule));
|
||||
|
||||
//添加autofac模块,需要添加模块
|
||||
builder.Host.ConfigureAutoFacContainer(container =>
|
||||
{
|
||||
container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, ModuleAssembly.Assemblies);
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
var db = app.Services.GetService<ISqlSugarClient>();
|
||||
app.UseErrorHandlingServer();
|
||||
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"Yi.BBS.Web": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:19001",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Yi.BBS.Application\Yi.BBS.Application.csproj" />
|
||||
<ProjectReference Include="..\Yi.BBS.Sqlsugar\Yi.BBS.Sqlsugar.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="appsettings.Production.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="appsettings.Development.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="nlog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="ip2region.db">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="key.pem">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="public.pem">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="yi-sqlsugar-dev.db">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="wwwroot\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,60 +0,0 @@
|
||||
using AspNetCore.Microsoft.AspNetCore.Builder;
|
||||
using StartupModules;
|
||||
using Yi.Framework.Auth.JwtBearer;
|
||||
using Yi.Framework.Core;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.BBS.Application;
|
||||
using Yi.BBS.Sqlsugar;
|
||||
using Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection;
|
||||
using Yi.Framework.Core.Autofac;
|
||||
using Yi.RBAC.Application;
|
||||
using Yi.Framework.AspNetCore;
|
||||
using Yi.Framework.Data.Json;
|
||||
using Yi.Framework.OperLogManager;
|
||||
using Yi.Framework.Core.Module;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Yi.BBS.Web
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiBBSSqlsugarModule),
|
||||
typeof(YiFrameworkAspNetCoreModule),
|
||||
typeof(YiFrameworkCoreAutofacModule),
|
||||
typeof(YiBBSApplicationModule)
|
||||
)]
|
||||
public class YiBBSWebModule : IStartupModule
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
//添加控制器与动态api
|
||||
services.AddControllers().AddJsonOptions(opt => {
|
||||
opt.JsonSerializerOptions.Converters.Add(new DateTimeJsonConverter("yyyy-MM-dd HH:mm:ss"));
|
||||
opt.JsonSerializerOptions.Converters.Add(new LongToStringConverter());
|
||||
opt.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
|
||||
});
|
||||
|
||||
services.AddAutoApiService(opt =>
|
||||
{
|
||||
//NETServiceTest所在程序集添加进动态api配置
|
||||
opt.CreateConventional(ModuleAssembly.Assemblies, option => option.RootPath = string.Empty);
|
||||
});
|
||||
|
||||
//添加swagger
|
||||
services.AddSwaggerServer<YiBBSApplicationModule>();
|
||||
}
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
//if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwaggerServer();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseRouting();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"Microsoft.AspNetCore": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
//程序启动地址,*代表全部网口
|
||||
"StartUrl": "http://*:19001",
|
||||
|
||||
//数据库类型列表
|
||||
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],
|
||||
|
||||
"DbConnOptions": {
|
||||
"Url": "DataSource=yi-sqlsugar-dev.db",
|
||||
"DbType": "Sqlite",
|
||||
"EnabledReadWrite": false,
|
||||
"EnabledCodeFirst": false,
|
||||
"EntityAssembly": null,
|
||||
"ReadUrl": [
|
||||
"DataSource=[xxxx]", //Sqlite
|
||||
"server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]", //Mysql
|
||||
"Data Source=[xxxx];Initial Catalog=[xxxx];User ID=[xxxx];password=[xxxx]" //Sqlserver
|
||||
]
|
||||
},
|
||||
|
||||
//授权
|
||||
"JwtTokenOptions": {
|
||||
"Audience": "yi",
|
||||
"Issuer": "localhost:19002",
|
||||
"Subject": "yiframwork",
|
||||
"ExpSecond": 259200
|
||||
},
|
||||
|
||||
//开启种子数据
|
||||
"EnabledDataSeed": false,
|
||||
|
||||
//阿里云短信
|
||||
"SmsAliyunOptions": {
|
||||
"AccessKeyId": "",
|
||||
"AccessKeySecret": "",
|
||||
"SignName": "",
|
||||
"TemplateCode": "",
|
||||
"EnableFeature": false
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -1,28 +0,0 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC7VJTUt9Us8cKj
|
||||
MzEfYyjiWA4R4/M2bS1GB4t7NXp98C3SC6dVMvDuictGeurT8jNbvJZHtCSuYEvu
|
||||
NMoSfm76oqFvAp8Gy0iz5sxjZmSnXyCdPEovGhLa0VzMaQ8s+CLOyS56YyCFGeJZ
|
||||
qgtzJ6GR3eqoYSW9b9UMvkBpZODSctWSNGj3P7jRFDO5VoTwCQAWbFnOjDfH5Ulg
|
||||
p2PKSQnSJP3AJLQNFNe7br1XbrhV//eO+t51mIpGSDCUv3E0DDFcWDTH9cXDTTlR
|
||||
ZVEiR2BwpZOOkE/Z0/BVnhZYL71oZV34bKfWjQIt6V/isSMahdsAASACp4ZTGtwi
|
||||
VuNd9tybAgMBAAECggEBAKTmjaS6tkK8BlPXClTQ2vpz/N6uxDeS35mXpqasqskV
|
||||
laAidgg/sWqpjXDbXr93otIMLlWsM+X0CqMDgSXKejLS2jx4GDjI1ZTXg++0AMJ8
|
||||
sJ74pWzVDOfmCEQ/7wXs3+cbnXhKriO8Z036q92Qc1+N87SI38nkGa0ABH9CN83H
|
||||
mQqt4fB7UdHzuIRe/me2PGhIq5ZBzj6h3BpoPGzEP+x3l9YmK8t/1cN0pqI+dQwY
|
||||
dgfGjackLu/2qH80MCF7IyQaseZUOJyKrCLtSD/Iixv/hzDEUPfOCjFDgTpzf3cw
|
||||
ta8+oE4wHCo1iI1/4TlPkwmXx4qSXtmw4aQPz7IDQvECgYEA8KNThCO2gsC2I9PQ
|
||||
DM/8Cw0O983WCDY+oi+7JPiNAJwv5DYBqEZB1QYdj06YD16XlC/HAZMsMku1na2T
|
||||
N0driwenQQWzoev3g2S7gRDoS/FCJSI3jJ+kjgtaA7Qmzlgk1TxODN+G1H91HW7t
|
||||
0l7VnL27IWyYo2qRRK3jzxqUiPUCgYEAx0oQs2reBQGMVZnApD1jeq7n4MvNLcPv
|
||||
t8b/eU9iUv6Y4Mj0Suo/AU8lYZXm8ubbqAlwz2VSVunD2tOplHyMUrtCtObAfVDU
|
||||
AhCndKaA9gApgfb3xw1IKbuQ1u4IF1FJl3VtumfQn//LiH1B3rXhcdyo3/vIttEk
|
||||
48RakUKClU8CgYEAzV7W3COOlDDcQd935DdtKBFRAPRPAlspQUnzMi5eSHMD/ISL
|
||||
DY5IiQHbIH83D4bvXq0X7qQoSBSNP7Dvv3HYuqMhf0DaegrlBuJllFVVq9qPVRnK
|
||||
xt1Il2HgxOBvbhOT+9in1BzA+YJ99UzC85O0Qz06A+CmtHEy4aZ2kj5hHjECgYEA
|
||||
mNS4+A8Fkss8Js1RieK2LniBxMgmYml3pfVLKGnzmng7H2+cwPLhPIzIuwytXywh
|
||||
2bzbsYEfYx3EoEVgMEpPhoarQnYPukrJO4gwE2o5Te6T5mJSZGlQJQj9q4ZB2Dfz
|
||||
et6INsK0oG8XVGXSpQvQh3RUYekCZQkBBFcpqWpbIEsCgYAnM3DQf3FJoSnXaMhr
|
||||
VBIovic5l0xFkEHskAjFTevO86Fsz1C2aSeRKSqGFoOQ0tmJzBEs1R6KqnHInicD
|
||||
TQrKhArgLXX4v3CddjfTRJkFWDbE/CkvKZNOrcf1nhaGCPspRJj2KUkj1Fhl9Cnc
|
||||
dn/RsYEONbwQSjIfMPkvxF+8HQ==
|
||||
-----END PRIVATE KEY-----
|
||||
@@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
autoReload="true"
|
||||
throwExceptions="false"
|
||||
internalLogLevel="Off">
|
||||
|
||||
<variable name="archiveAboveSize" value="10485760"/>
|
||||
<variable name="maxArchiveFiles" value="50"/>
|
||||
<variable name="layout" value="${date:format=HH\:mm\:ss.fff}|${level}|${threadId:format=threadId}|${logger}${newline}>>${message} ${exception:format=tostring}"/>
|
||||
<variable name="logsRootPath" value="${basedir}/logs/${shortdate}" />
|
||||
|
||||
<targets>
|
||||
<target xsi:type="File"
|
||||
name="AllFile"
|
||||
fileName="${logsRootPath}/AllFile/log.log"
|
||||
layout="${layout}${newline}"
|
||||
archiveAboveSize="${archiveAboveSize}"
|
||||
maxArchiveFiles="${maxArchiveFiles}" />
|
||||
|
||||
<target xsi:type="ColoredConsole"
|
||||
name="ColoredConsole"
|
||||
layout="${layout}${newline}">
|
||||
<highlight-row condition="level == LogLevel.Info" foregroundColor="White" />
|
||||
<highlight-row condition="level == LogLevel.Debug" foregroundColor="Green" />
|
||||
<highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow" />
|
||||
<highlight-row condition="level == LogLevel.Error" foregroundColor="Red" />
|
||||
<highlight-row condition="level == LogLevel.Fatal" foregroundColor="Red" backgroundColor="White" />
|
||||
</target>
|
||||
|
||||
<target xsi:type="File" name="OwnFile"
|
||||
fileName="${logsRootPath}/OwnFile/log.log"
|
||||
layout="${layout}|Url: ${aspnet-request-url}|Action: ${aspnet-mvc-action}${newline}"
|
||||
archiveAboveSize="${archiveAboveSize}"
|
||||
maxArchiveFiles="${maxArchiveFiles}" />
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
<logger name="Quartz.*" maxlevel="Warn" final="true" />
|
||||
<logger name="Grpc.*" maxlevel="Debug" final="true" />
|
||||
<logger name="Grpc.*" maxlevel="Trace" final="true" />
|
||||
<logger name="Microsoft.EntityFrameworkCore.*" maxlevel="Warn" final="true" />
|
||||
<logger name="Microsoft.AspNetCore.*" maxlevel="Warn" final="true" />
|
||||
<logger name="Microsoft.AspNetCore.SignalR.*" maxlevel="Warn" final="true" />
|
||||
<logger name="*" minlevel="Debug" maxlevel="Fatal" writeTo="AllFile,ColoredConsole"/>
|
||||
<logger name="Microsoft.Hosting.Lifetime" minlevel="Info" writeTo="ColoredConsole,OwnFile" final="true" />
|
||||
<logger name="Microsoft.*" maxlevel="Info" final="true" />
|
||||
<logger name="*" minlevel="Trace" writeTo="OwnFile" />
|
||||
|
||||
</rules>
|
||||
</nlog>
|
||||
@@ -1,9 +0,0 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu1SU1LfVLPHCozMxH2Mo
|
||||
4lgOEePzNm0tRgeLezV6ffAt0gunVTLw7onLRnrq0/IzW7yWR7QkrmBL7jTKEn5u
|
||||
+qKhbwKfBstIs+bMY2Zkp18gnTxKLxoS2tFczGkPLPgizskuemMghRniWaoLcyeh
|
||||
kd3qqGElvW/VDL5AaWTg0nLVkjRo9z+40RQzuVaE8AkAFmxZzow3x+VJYKdjykkJ
|
||||
0iT9wCS0DRTXu269V264Vf/3jvredZiKRkgwlL9xNAwxXFg0x/XFw005UWVRIkdg
|
||||
cKWTjpBP2dPwVZ4WWC+9aGVd+Gyn1o0CLelf4rEjGoXbAAEgAqeGUxrcIlbjXfbc
|
||||
mwIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
Binary file not shown.
@@ -1,4 +0,0 @@
|
||||
global using Yi.Framework.Core.Attributes;
|
||||
global using Yi.Framework.Core.Helper;
|
||||
global using Yi.Framework.Core.Model;
|
||||
global using Yi.Framework.Core.Exceptions;
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Yi.Template.Application.Contracts</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Yi.Template.Application.Contracts.School.Dtos.StudentCreateInputVo">
|
||||
<summary>
|
||||
Student输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Template.Application.Contracts.School.IStudentService">
|
||||
<summary>
|
||||
Student
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.Template.Application.Contracts.School.Dtos
|
||||
{
|
||||
public class StudentGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int? Height { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Template.Application.Contracts.School.Dtos;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.Template.Application.Contracts.School
|
||||
{
|
||||
/// <summary>
|
||||
/// Student
|
||||
/// </summary>
|
||||
public interface IStudentService : ICrudAppService<StudentGetOutputDto, StudentGetListOutputDto, long, StudentGetListInputVo, StudentCreateInputVo, StudentUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<DocumentationFile>./ApplicationContractsSwaggerDoc.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Yi.Template.Domain.Shared\Yi.Template.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="ApplicationContractsSwaggerDoc.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,27 +0,0 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StartupModules;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Template.Domain.Shared;
|
||||
|
||||
namespace Yi.Template.Application.Contracts
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiTemplateDomainSharedModule)
|
||||
)]
|
||||
public class YiTemplateApplicationContractsModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Yi.Template.Application</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Yi.Template.Application.School.StudentService">
|
||||
<summary>
|
||||
Student服务实现
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -1,17 +0,0 @@
|
||||
using Yi.Template.Application.Contracts.School;
|
||||
using Cike.AutoWebApi.Setting;
|
||||
using Yi.Template.Application.Contracts.School.Dtos;
|
||||
using Yi.Template.Domain.School.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
|
||||
namespace Yi.Template.Application.School
|
||||
{
|
||||
/// <summary>
|
||||
/// Student服务实现
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class StudentService : CrudAppService<StudentEntity, StudentGetOutputDto, StudentGetListOutputDto, long, StudentGetListInputVo, StudentCreateInputVo, StudentUpdateInputVo>,
|
||||
IStudentService, IAutoApiService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<DocumentationFile>./ApplicationSwaggerDoc.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Auth.JwtBearer\Yi.Framework.Auth.JwtBearer.csproj" />
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Uow\Yi.Framework.Uow.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Application.Contracts\Yi.Template.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Domain\Yi.Template.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="ApplicationSwaggerDoc.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,33 +0,0 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StartupModules;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Template.Application.Contracts;
|
||||
using Yi.Framework.Auth.JwtBearer;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Data;
|
||||
using Yi.Framework.Ddd;
|
||||
using Yi.Template.Domain;
|
||||
|
||||
namespace Yi.Template.Application
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiTemplateApplicationContractsModule),
|
||||
typeof(YiTemplateDomainModule),
|
||||
typeof(YiFrameworkAuthJwtBearerModule)
|
||||
)]
|
||||
public class YiTemplateApplicationModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Template.Domain.Shared.School.ConstClasses
|
||||
{
|
||||
/// <summary>
|
||||
/// 常量定义
|
||||
/// </summary>
|
||||
|
||||
public class StudentConst
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd\Yi.Framework.Ddd.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,27 +0,0 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StartupModules;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Ddd;
|
||||
|
||||
namespace Yi.Template.Domain.Shared
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkDddModule)
|
||||
)]
|
||||
public class YiTemplateDomainSharedModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Yi.Template.Domain</name>
|
||||
</assembly>
|
||||
<members>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -1,27 +0,0 @@
|
||||
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.Template.Domain.School.Entities;
|
||||
|
||||
namespace Yi.Template.Domain.School.DataSeeds
|
||||
{
|
||||
[AppService(typeof(IDataSeed))]
|
||||
public class StudentDataSeed : AbstractDataSeed<StudentEntity>
|
||||
{
|
||||
public StudentDataSeed(IRepository<StudentEntity> repository) : base(repository)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<StudentEntity> GetSeedData()
|
||||
{
|
||||
return new List<StudentEntity>() { new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好", Phone = "123", Height = 188, IsDeleted = false } ,
|
||||
new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好1", Phone = "123", Height = 188, IsDeleted = false },
|
||||
new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好2", Phone = "123", Height = 188, IsDeleted = false }
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.Entities;
|
||||
using Yi.Framework.Ddd.Entities;
|
||||
|
||||
namespace Yi.Template.Domain.School.Entities
|
||||
{
|
||||
[SugarTable("Student")]
|
||||
public class StudentEntity : IEntity<long>,ISoftDelete
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public int? Height { get; set; }
|
||||
|
||||
public string? Phone { get; set; }
|
||||
public bool IsDeleted { get; set; } = false;
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<DocumentationFile>./DomainSwaggerDoc.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Data\Yi.Framework.Data.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Domain.Shared\Yi.Template.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="DomainSwaggerDoc.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,30 +0,0 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StartupModules;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Data;
|
||||
using Yi.Template.Domain.Shared;
|
||||
|
||||
namespace Yi.Template.Domain
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiTemplateDomainSharedModule),
|
||||
typeof(YiFrameworkDataModule)
|
||||
)]
|
||||
public class YiTemplateDomainModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
//services.AddTransient<StudentManager>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Core.Sqlsugar\Yi.Framework.Core.Sqlsugar.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Domain\Yi.Template.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,28 +0,0 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StartupModules;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Core.Sqlsugar;
|
||||
using Yi.Template.Domain;
|
||||
|
||||
namespace Yi.Template.Sqlsugar
|
||||
{
|
||||
[DependsOn(typeof(YiFrameworkCoreSqlsugarModule),
|
||||
typeof(YiTemplateDomainModule))]
|
||||
public class YiTemplateSqlsugarModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
//services.AddTransient<IStudentRepository, StudentRepository>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
using AspNetCore.Microsoft.AspNetCore.Hosting;
|
||||
using NLog;
|
||||
using NLog.Extensions.Logging;
|
||||
using Yi.Framework.Core.Autofac.Extensions;
|
||||
using Yi.Framework.Core.Autofac.Modules;
|
||||
using Yi.Framework.Core.Extensions;
|
||||
using Yi.Framework.Core.Module;
|
||||
using Yi.Template.Web;
|
||||
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
//配置日志
|
||||
builder.Services.AddLogging(builder => { builder.ClearProviders().AddNLog("nlog.config").SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); });
|
||||
Logger? _logger = LogManager.Setup().LoadConfigurationFromAssemblyResource(typeof(Program).Assembly).GetCurrentClassLogger();
|
||||
_logger.Info("-----( ¯ □ ¯ )YiFrameowrk框架启动-----");
|
||||
//设置启动url
|
||||
builder.WebHost.UseStartUrlsServer(builder.Configuration);
|
||||
|
||||
//添加模块
|
||||
builder.UseYiModules(typeof(YiTemplateWebModule));
|
||||
|
||||
//添加autofac模块,需要添加模块
|
||||
builder.Host.ConfigureAutoFacContainer(container =>
|
||||
{
|
||||
container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, ModuleAssembly.Assemblies);
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
//全局错误中间件,需要放在最早
|
||||
app.UseErrorHandlingServer();
|
||||
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"Yi.Template.Web": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:19002",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Yi.Template.Application\Yi.Template.Application.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Sqlsugar\Yi.Template.Sqlsugar.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="nlog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="key.pem">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="public.pem">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,52 +0,0 @@
|
||||
using AspNetCore.Microsoft.AspNetCore.Builder;
|
||||
using StartupModules;
|
||||
using Yi.Framework.AspNetCore;
|
||||
using Yi.Framework.Auth.JwtBearer;
|
||||
using Yi.Framework.Core;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Core.Autofac;
|
||||
using Yi.Framework.Core.Module;
|
||||
using Yi.Framework.Data.Json;
|
||||
using Yi.Template.Application;
|
||||
using Yi.Template.Sqlsugar;
|
||||
|
||||
namespace Yi.Template.Web
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkAspNetCoreModule),
|
||||
typeof(YiFrameworkCoreAutofacModule),
|
||||
typeof(YiTemplateSqlsugarModule),
|
||||
typeof(YiTemplateApplicationModule)
|
||||
)]
|
||||
public class YiTemplateWebModule : IStartupModule
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
//添加控制器与动态api
|
||||
services.AddControllers().AddJsonOptions(opt => {
|
||||
opt.JsonSerializerOptions.Converters.Add(new DateTimeJsonConverter("yyyy-MM-dd HH:mm:ss"));
|
||||
});
|
||||
services.AddAutoApiService(opt =>
|
||||
{
|
||||
//NETServiceTest所在程序集添加进动态api配置
|
||||
opt.CreateConventional(ModuleAssembly.Assemblies, option => option.RootPath = string.Empty);
|
||||
});
|
||||
|
||||
//添加swagger
|
||||
services.AddSwaggerServer<YiTemplateApplicationModule>();
|
||||
}
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
//if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwaggerServer();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseRouting();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
//"Default": "Debug",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
//程序启动地址,*代表全部网口
|
||||
"StartUrl": "http://*:19002",
|
||||
|
||||
//数据库类型列表
|
||||
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],
|
||||
|
||||
"DbConnOptions": {
|
||||
"Url": "DataSource=yi-sqlsugar-dev.db",
|
||||
"DbType": "Sqlite",
|
||||
"EnabledDbSeed": false,
|
||||
"EnabledReadWrite": false,
|
||||
"EnabledCodeFirst": true,
|
||||
"EntityAssembly": null,
|
||||
"ReadUrl": [
|
||||
"DataSource=[xxxx]", //sqlite
|
||||
"server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]", //mysql
|
||||
"Data Source=[xxxx];Initial Catalog=[xxxx];User ID=[xxxx];password=[xxxx]" //sqlserver
|
||||
]
|
||||
},
|
||||
|
||||
//授权
|
||||
"JwtTokenOptions": {
|
||||
"Audience": "yi",
|
||||
"Issuer": "localhost:19002",
|
||||
"Subject": "yiframwork",
|
||||
"ExpSecond": 3600
|
||||
},
|
||||
|
||||
//开启种子数据
|
||||
"EnabledDataSeed": true
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC7VJTUt9Us8cKj
|
||||
MzEfYyjiWA4R4/M2bS1GB4t7NXp98C3SC6dVMvDuictGeurT8jNbvJZHtCSuYEvu
|
||||
NMoSfm76oqFvAp8Gy0iz5sxjZmSnXyCdPEovGhLa0VzMaQ8s+CLOyS56YyCFGeJZ
|
||||
qgtzJ6GR3eqoYSW9b9UMvkBpZODSctWSNGj3P7jRFDO5VoTwCQAWbFnOjDfH5Ulg
|
||||
p2PKSQnSJP3AJLQNFNe7br1XbrhV//eO+t51mIpGSDCUv3E0DDFcWDTH9cXDTTlR
|
||||
ZVEiR2BwpZOOkE/Z0/BVnhZYL71oZV34bKfWjQIt6V/isSMahdsAASACp4ZTGtwi
|
||||
VuNd9tybAgMBAAECggEBAKTmjaS6tkK8BlPXClTQ2vpz/N6uxDeS35mXpqasqskV
|
||||
laAidgg/sWqpjXDbXr93otIMLlWsM+X0CqMDgSXKejLS2jx4GDjI1ZTXg++0AMJ8
|
||||
sJ74pWzVDOfmCEQ/7wXs3+cbnXhKriO8Z036q92Qc1+N87SI38nkGa0ABH9CN83H
|
||||
mQqt4fB7UdHzuIRe/me2PGhIq5ZBzj6h3BpoPGzEP+x3l9YmK8t/1cN0pqI+dQwY
|
||||
dgfGjackLu/2qH80MCF7IyQaseZUOJyKrCLtSD/Iixv/hzDEUPfOCjFDgTpzf3cw
|
||||
ta8+oE4wHCo1iI1/4TlPkwmXx4qSXtmw4aQPz7IDQvECgYEA8KNThCO2gsC2I9PQ
|
||||
DM/8Cw0O983WCDY+oi+7JPiNAJwv5DYBqEZB1QYdj06YD16XlC/HAZMsMku1na2T
|
||||
N0driwenQQWzoev3g2S7gRDoS/FCJSI3jJ+kjgtaA7Qmzlgk1TxODN+G1H91HW7t
|
||||
0l7VnL27IWyYo2qRRK3jzxqUiPUCgYEAx0oQs2reBQGMVZnApD1jeq7n4MvNLcPv
|
||||
t8b/eU9iUv6Y4Mj0Suo/AU8lYZXm8ubbqAlwz2VSVunD2tOplHyMUrtCtObAfVDU
|
||||
AhCndKaA9gApgfb3xw1IKbuQ1u4IF1FJl3VtumfQn//LiH1B3rXhcdyo3/vIttEk
|
||||
48RakUKClU8CgYEAzV7W3COOlDDcQd935DdtKBFRAPRPAlspQUnzMi5eSHMD/ISL
|
||||
DY5IiQHbIH83D4bvXq0X7qQoSBSNP7Dvv3HYuqMhf0DaegrlBuJllFVVq9qPVRnK
|
||||
xt1Il2HgxOBvbhOT+9in1BzA+YJ99UzC85O0Qz06A+CmtHEy4aZ2kj5hHjECgYEA
|
||||
mNS4+A8Fkss8Js1RieK2LniBxMgmYml3pfVLKGnzmng7H2+cwPLhPIzIuwytXywh
|
||||
2bzbsYEfYx3EoEVgMEpPhoarQnYPukrJO4gwE2o5Te6T5mJSZGlQJQj9q4ZB2Dfz
|
||||
et6INsK0oG8XVGXSpQvQh3RUYekCZQkBBFcpqWpbIEsCgYAnM3DQf3FJoSnXaMhr
|
||||
VBIovic5l0xFkEHskAjFTevO86Fsz1C2aSeRKSqGFoOQ0tmJzBEs1R6KqnHInicD
|
||||
TQrKhArgLXX4v3CddjfTRJkFWDbE/CkvKZNOrcf1nhaGCPspRJj2KUkj1Fhl9Cnc
|
||||
dn/RsYEONbwQSjIfMPkvxF+8HQ==
|
||||
-----END PRIVATE KEY-----
|
||||
@@ -1,9 +0,0 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu1SU1LfVLPHCozMxH2Mo
|
||||
4lgOEePzNm0tRgeLezV6ffAt0gunVTLw7onLRnrq0/IzW7yWR7QkrmBL7jTKEn5u
|
||||
+qKhbwKfBstIs+bMY2Zkp18gnTxKLxoS2tFczGkPLPgizskuemMghRniWaoLcyeh
|
||||
kd3qqGElvW/VDL5AaWTg0nLVkjRo9z+40RQzuVaE8AkAFmxZzow3x+VJYKdjykkJ
|
||||
0iT9wCS0DRTXu269V264Vf/3jvredZiKRkgwlL9xNAwxXFg0x/XFw005UWVRIkdg
|
||||
cKWTjpBP2dPwVZ4WWC+9aGVd+Gyn1o0CLelf4rEjGoXbAAEgAqeGUxrcIlbjXfbc
|
||||
mwIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
Binary file not shown.
@@ -1,4 +0,0 @@
|
||||
global using Yi.Framework.Core.Attributes;
|
||||
global using Yi.Framework.Core.Helper;
|
||||
global using Yi.Framework.Core.Model;
|
||||
global using Yi.Framework.Core.Exceptions;
|
||||
@@ -1,30 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Argee
|
||||
{
|
||||
public class AgreeDto
|
||||
{
|
||||
public AgreeDto(bool isAgree)
|
||||
{
|
||||
IsAgree = isAgree;
|
||||
if (isAgree)
|
||||
{
|
||||
|
||||
Message = "点赞成功,点赞+1";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Message = "取消点赞,点赞-1";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public bool IsAgree { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner
|
||||
{
|
||||
/// <summary>
|
||||
/// Banner输入创建对象
|
||||
/// </summary>
|
||||
public class BannerCreateInputVo
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Color { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner
|
||||
{
|
||||
public class BannerGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner
|
||||
{
|
||||
public class BannerGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Color { get; set; }
|
||||
|
||||
public DateTime CreationTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos
|
||||
{
|
||||
public class BannerGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Color { get; set; }
|
||||
|
||||
public DateTime CreationTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner
|
||||
{
|
||||
public class BannerUpdateInputVo
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Color { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Exhibition.Dtos;
|
||||
using Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Exhibition
|
||||
{
|
||||
/// <summary>
|
||||
/// Banner抽象
|
||||
/// </summary>
|
||||
public interface IBannerService : ICrudAppService<BannerGetOutputDto, BannerGetListOutputDto, long, BannerGetListInputVo, BannerCreateInputVo, BannerUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class ArticleAllOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
//批量查询,不给内容,性能考虑
|
||||
//public string Content { get; set; }
|
||||
public string Name { get; set; }
|
||||
public long DiscussId { get; set; }
|
||||
public long ParentId { get; set; }
|
||||
|
||||
public List<ArticleAllOutputDto> Children { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// Article输入创建对象
|
||||
/// </summary>
|
||||
public class ArticleCreateInputVo
|
||||
{
|
||||
public string Content { get; set; }
|
||||
public string Name { get; set; }
|
||||
public long DiscussId { get; set; }
|
||||
public long ParentId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class ArticleGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Content { get; set; }
|
||||
public string Name { get; set; }
|
||||
public long DiscussId { get; set; }
|
||||
public long ParentId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class ArticleGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>ܿ<EFBFBD><DCBF><EFBFBD>
|
||||
//public string Content { get; set; }
|
||||
public string Name { get; set; }
|
||||
public long DiscussId { get; set; }
|
||||
|
||||
public List<ArticleGetListOutputDto> Children { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class ArticleGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Content { get; set; }
|
||||
public string Name { get; set; }
|
||||
public long DiscussId { get; set; }
|
||||
public long ParentId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class ArticleUpdateInputVo
|
||||
{
|
||||
public string Content { get; set; }
|
||||
public string Name { get; set; }
|
||||
public long DiscussId { get; set; }
|
||||
public long ParentId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// Comment输入创建对象
|
||||
/// </summary>
|
||||
public class CommentCreateInputVo
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 评论id
|
||||
/// </summary>
|
||||
public string Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主题id
|
||||
/// </summary>
|
||||
public long DiscussId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第一层评论id,第一层为0
|
||||
/// </summary>
|
||||
public long RootId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 被回复的CommentId,第一层为0
|
||||
/// </summary>
|
||||
public long ParentId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class CommentGetListInputVo
|
||||
{
|
||||
public DateTime? creationTime { get; set; }
|
||||
public string? Content { get; set; }
|
||||
|
||||
//Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ī<EFBFBD><C4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ
|
||||
public long? DiscussId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD>۶෴
|
||||
/// </summary>
|
||||
public class CommentGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
|
||||
public DateTime? CreationTime { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public string Content { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD>id
|
||||
/// </summary>
|
||||
public long DiscussId { get; set; }
|
||||
|
||||
public long ParentId { get; set; }
|
||||
|
||||
public long RootId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <20>û<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>Ϣ
|
||||
/// </summary>
|
||||
public UserGetOutputDto CreateUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD>۵<EFBFBD><DBB5>û<EFBFBD><C3BB><EFBFBD>Ϣ
|
||||
/// </summary>
|
||||
public UserGetOutputDto CommentedUser { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>Σ<EFBFBD><CEA3><EFBFBD><EFBFBD>Ǵ<EFBFBD><C7B4><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ά<EFBFBD><CEAC><EFBFBD>飬<EFBFBD><E9A3AC>Childrenֻ<6E><D6BB><EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>һ<EFBFBD><D2BB>
|
||||
/// </summary>
|
||||
public List<CommentGetListOutputDto> Children { get; set; } = new List<CommentGetListOutputDto>();
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD><D8A3><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD><DBBC><EFBFBD>
|
||||
/// </summary>
|
||||
public class CommentGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public string Content { get; set; }
|
||||
|
||||
public long DiscussId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <20>û<EFBFBD>id<69><64><EFBFBD><EFBFBD>Ϊ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
|
||||
public UserGetOutputDto User { get; set; }
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>id
|
||||
/// </summary>
|
||||
public long RootId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>CommentId
|
||||
/// </summary>
|
||||
public long ParentId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class CommentUpdateInputVo
|
||||
{
|
||||
|
||||
public string Content { get; set; }
|
||||
|
||||
//<2F><><EFBFBD>²<EFBFBD><C2B2>ܽ<EFBFBD><DCBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Domain.Shared.Forum.EnumClasses;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
|
||||
{
|
||||
/// <summary>
|
||||
/// Discuss输入创建对象
|
||||
/// </summary>
|
||||
public class DiscussCreateInputVo
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string? Types { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public DateTime? CreateTime { get; set; } = DateTime.Now;
|
||||
public string Content { get; set; }
|
||||
public string? Color { get; set; }
|
||||
|
||||
public long PlateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 默认公开
|
||||
/// </summary>
|
||||
public DiscussPermissionTypeEnum PermissionType { get; set; } = DiscussPermissionTypeEnum.Public;
|
||||
/// <summary>
|
||||
/// 封面
|
||||
/// </summary>
|
||||
public string? Cover { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Domain.Shared.Forum.ConstClasses;
|
||||
using Yi.BBS.Domain.Shared.Forum.EnumClasses;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
|
||||
{
|
||||
public class DiscussGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public string? Title { get; set; }
|
||||
|
||||
public long? PlateId { get; set; }
|
||||
|
||||
//Ĭ<>ϲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD>ö<EFBFBD>
|
||||
public bool IsTop { get; set; } = false;
|
||||
|
||||
|
||||
//<2F><>ѯ<EFBFBD><D1AF>ʽ
|
||||
public QueryDiscussTypeEnum Type { get; set; } = QueryDiscussTypeEnum.New;
|
||||
}
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Domain.Shared.Forum.ConstClasses;
|
||||
using Yi.BBS.Domain.Shared.Forum.EnumClasses;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
|
||||
{
|
||||
public class DiscussGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// <20>Ƿ<EFBFBD><C7B7>ѵ<EFBFBD><D1B5><EFBFBD>
|
||||
/// </summary>
|
||||
public bool IsAgree { get; set; }
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Types { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
|
||||
public int AgreeNum { get; set; }
|
||||
public int SeeNum { get; set; }
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>ܿ<EFBFBD><DCBF><EFBFBD>
|
||||
//public string Content { get; set; }
|
||||
public string? Color { get; set; }
|
||||
|
||||
public long PlateId { get; set; }
|
||||
|
||||
//<2F>Ƿ<EFBFBD><C7B7>ö<EFBFBD><C3B6><EFBFBD>Ĭ<EFBFBD><C4AC>false
|
||||
public bool IsTop { get; set; }
|
||||
|
||||
public DiscussPermissionTypeEnum PermissionType { get; set; }
|
||||
//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ֹ<EFBFBD><D6B9>Ĭ<EFBFBD><C4AC>false
|
||||
public bool IsBan { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public string? Cover { get; set; }
|
||||
|
||||
//˽<><CBBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ж<EFBFBD>codeȨ<65><C8A8>
|
||||
public string? PrivateCode { get; set; }
|
||||
public DateTime CreationTime { get; set; }
|
||||
|
||||
public List<long> PermissionUserIds { get; set; }
|
||||
|
||||
public UserGetListOutputDto User { get; set; }
|
||||
|
||||
public void SetBan()
|
||||
{
|
||||
this.Title = DiscussConst.˽<EFBFBD><EFBFBD>;
|
||||
this.Introduction = "";
|
||||
this.Cover = null;
|
||||
//<2F><><EFBFBD><EFBFBD>ֹ
|
||||
this.IsBan = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class DiscussGetListOutputDtoExtension
|
||||
{
|
||||
|
||||
public static void ApplyPermissionTypeFilter(this List<DiscussGetListOutputDto> dtos, long userId)
|
||||
{
|
||||
dtos?.ForEach(dto =>
|
||||
{
|
||||
switch (dto.PermissionType)
|
||||
{
|
||||
case DiscussPermissionTypeEnum.Public:
|
||||
break;
|
||||
case DiscussPermissionTypeEnum.Oneself:
|
||||
//<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><C7BD>Լ<EFBFBD><D4BC>ɼ<EFBFBD><C9BC><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD>ǵ<EFBFBD>ǰ<EFBFBD><C7B0>¼<EFBFBD>û<EFBFBD>
|
||||
if (dto.User.Id != userId)
|
||||
{
|
||||
dto.SetBan();
|
||||
}
|
||||
break;
|
||||
case DiscussPermissionTypeEnum.User:
|
||||
//<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>ֿɼ<D6BF><C9BC><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD>ǵ<EFBFBD>ǰ<EFBFBD><C7B0>¼<EFBFBD>û<EFBFBD> Ҳ <20><><EFBFBD>ڿɼ<DABF><C9BC>û<EFBFBD><C3BB>б<EFBFBD><D0B1><EFBFBD>
|
||||
if (dto.User.Id != userId && !dto.PermissionUserIds.Contains(userId))
|
||||
{
|
||||
dto.SetBan();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Domain.Shared.Forum.EnumClasses;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class DiscussGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string? Types { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public int AgreeNum { get; set; }
|
||||
public int SeeNum { get; set; }
|
||||
public string Content { get; set; }
|
||||
public string? Color { get; set; }
|
||||
|
||||
public long PlateId { get; set; }
|
||||
//<2F>Ƿ<EFBFBD><C7B7>ö<EFBFBD><C3B6><EFBFBD>Ĭ<EFBFBD><C4AC>false
|
||||
public bool IsTop { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public string? Cover { get; set; }
|
||||
//<2F>Ƿ<EFBFBD>˽<EFBFBD>У<EFBFBD>Ĭ<EFBFBD><C4AC>false
|
||||
public bool IsPrivate { get; set; }
|
||||
|
||||
//˽<><CBBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ж<EFBFBD>codeȨ<65><C8A8>
|
||||
public string? PrivateCode { get; set; }
|
||||
public DateTime CreationTime { get; set; }
|
||||
public DiscussPermissionTypeEnum PermissionType { get; set; }
|
||||
|
||||
public List<long> PermissionUserIds { get; set; }
|
||||
public UserGetListOutputDto User { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Domain.Shared.Forum.EnumClasses;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
|
||||
{
|
||||
public class DiscussUpdateInputVo
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string? Types { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public int AgreeNum { get; set; }
|
||||
public int SeeNum { get; set; }
|
||||
public string Content { get; set; }
|
||||
public string? Color { get; set; }
|
||||
|
||||
public List<long> PermissionUserIds { get; set; }
|
||||
|
||||
public DiscussPermissionTypeEnum PermissionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public string? Cover { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// Label输入创建对象
|
||||
/// </summary>
|
||||
public class MyTypeCreateInputVo
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string? Color { get; set; }
|
||||
public string? BackgroundColor { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class MyTypeGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Color { get; set; }
|
||||
public string? BackgroundColor { get; set; }
|
||||
public long UserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class MyTypeGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Color { get; set; }
|
||||
public string? BackgroundColor { get; set; }
|
||||
public long UserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class MyTypeOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Color { get; set; }
|
||||
public string? BackgroundColor { get; set; }
|
||||
public long UserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class MyTypeUpdateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Color { get; set; }
|
||||
public string? BackgroundColor { get; set; }
|
||||
public long UserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Plate
|
||||
{
|
||||
/// <summary>
|
||||
/// Plate输入创建对象
|
||||
/// </summary>
|
||||
public class PlateCreateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Plate
|
||||
{
|
||||
public class PlateGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Plate
|
||||
{
|
||||
public class PlateGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos
|
||||
{
|
||||
public class PlateGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum.Dtos.Plate
|
||||
{
|
||||
public class PlateUpdateInputVo
|
||||
{
|
||||
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Logo { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum
|
||||
{
|
||||
/// <summary>
|
||||
/// Article服务抽象
|
||||
/// </summary>
|
||||
public interface IArticleService : ICrudAppService<ArticleGetOutputDto, ArticleGetListOutputDto, long, ArticleGetListInputVo, ArticleCreateInputVo, ArticleUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum
|
||||
{
|
||||
/// <summary>
|
||||
/// Comment服务抽象
|
||||
/// </summary>
|
||||
public interface ICommentService : ICrudAppService<CommentGetOutputDto, CommentGetListOutputDto, long, CommentGetListInputVo, CommentCreateInputVo, CommentUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos.Discuss;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum
|
||||
{
|
||||
/// <summary>
|
||||
/// Discuss服务抽象
|
||||
/// </summary>
|
||||
public interface IDiscussService : ICrudAppService<DiscussGetOutputDto, DiscussGetListOutputDto, long, DiscussGetListInputVo, DiscussCreateInputVo, DiscussUpdateInputVo>
|
||||
{
|
||||
Task VerifyDiscussPermissionAsync(long discussId);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum
|
||||
{
|
||||
/// <summary>
|
||||
/// Label服务抽象
|
||||
/// </summary>
|
||||
public interface ILabelService : ICrudAppService<MyTypeOutputDto, MyTypeGetListOutputDto, long, MyTypeGetListInputVo, MyTypeCreateInputVo, MyTypeUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos;
|
||||
using Yi.BBS.Application.Contracts.Forum.Dtos.Plate;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.Forum
|
||||
{
|
||||
/// <summary>
|
||||
/// Plate服务抽象
|
||||
/// </summary>
|
||||
public interface IPlateService : ICrudAppService<PlateGetOutputDto, PlateGetListOutputDto, long, PlateGetListInputVo, PlateCreateInputVo, PlateUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.GlobalSetting.Dtos.Temp
|
||||
{
|
||||
public class ActionJwtDto
|
||||
{
|
||||
|
||||
public long Id { get; set; }
|
||||
public string ActionName { get; set; }
|
||||
public string Router { get; set; }
|
||||
public string Icon { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.GlobalSetting.Dtos.Temp
|
||||
{
|
||||
public class LoginDto
|
||||
{
|
||||
public LoginDto(string token)
|
||||
{
|
||||
Token = token;
|
||||
}
|
||||
public string Token { get; set; }
|
||||
public LoginUserInfoDto User{get;set;}
|
||||
}
|
||||
|
||||
public class LoginUserInfoDto
|
||||
{
|
||||
|
||||
public long Id { get; set; }
|
||||
|
||||
public string UserName { get; set; }
|
||||
|
||||
public int Level { get; set; }
|
||||
|
||||
public string Icon { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.BBS.Application.Contracts.GlobalSetting
|
||||
{
|
||||
/// <summary>
|
||||
/// Setting应用抽象
|
||||
/// </summary>
|
||||
public interface ISettingService : IApplicationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取配置标题
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<string> GetTitleAsync();
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user