更改项目目录

This commit is contained in:
橙子
2023-01-24 21:02:39 +08:00
parent ec440f13b1
commit 80723496d0
21 changed files with 231 additions and 28 deletions

View File

@@ -4,14 +4,14 @@
<name>Yi.BBS.Application.Contracts</name>
</assembly>
<members>
<member name="T:Yi.BBS.Application.Contracts.School.Dtos.StudentCreateInputVo">
<member name="T:Yi.BBS.Application.Contracts.Forum.Dtos.PlateCreateInputVo">
<summary>
Student输入创建对象
Plate输入创建对象
</summary>
</member>
<member name="T:Yi.BBS.Application.Contracts.School.IStudentService">
<member name="T:Yi.BBS.Application.Contracts.Forum.IPlateService">
<summary>
Student
Plate<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
</summary>
</member>
</members>

View File

@@ -4,9 +4,9 @@
<name>Yi.BBS.Application</name>
</assembly>
<members>
<member name="T:Yi.BBS.Application.School.StudentService">
<member name="T:Yi.BBS.Application.Forum.PlateService">
<summary>
Student服务实现
Plate服务实现
</summary>
</member>
</members>

View File

@@ -5,13 +5,10 @@ using Yi.Framework.Core.Extensions;
using Yi.BBS.Web;
var builder = WebApplication.CreateBuilder(args);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>url
builder.WebHost.UseStartUrlsServer(builder.Configuration);
//<2F><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
builder.UseYiModules(typeof(YiBBSWebModule));
//<2F><><EFBFBD><EFBFBD>autofacģ<63><C4A3>,<2C><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
builder.Host.ConfigureAutoFacContainer(container =>
{
container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, typeof(YiBBSWebModule).Assembly);
@@ -19,7 +16,6 @@ builder.Host.ConfigureAutoFacContainer(container =>
var app = builder.Build();
//ȫ<>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
app.UseErrorHandlingServer();
app.UseAuthentication();

View File

@@ -6,7 +6,7 @@
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:19002",
"applicationUrl": "http://localhost:19003",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

View File

@@ -8,7 +8,7 @@
"AllowedHosts": "*",
//程序启动地址,*代表全部网口
"StartUrl": "http://*:19002",
"StartUrl": "http://*:19003",
//数据库类型列表
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],

View File

@@ -5,13 +5,13 @@ using Yi.Framework.Core.Extensions;
using Yi.Template.Web;
var builder = WebApplication.CreateBuilder(args);
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>url
//设置启动url
builder.WebHost.UseStartUrlsServer(builder.Configuration);
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>
//添加模块
builder.UseYiModules(typeof(YiTemplateWebModule));
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD>autofacģ<EFBFBD><EFBFBD>,<2C><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
//添加autofac模块,需要添加模块
builder.Host.ConfigureAutoFacContainer(container =>
{
container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, typeof(YiTemplateWebModule).Assembly);
@@ -19,7 +19,7 @@ builder.Host.ConfigureAutoFacContainer(container =>
var app = builder.Build();
//ȫ<EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//全局错误中间件,需要放在最早
app.UseErrorHandlingServer();
app.UseAuthentication();

View File

@@ -0,0 +1,21 @@
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 Title { get; set; }
public string PlateType { get; set; }
public string Introduction { get; set; }
public DateTime? CreateTime { get; set; }
public int AgreeNum { get; set; }
public int SeeNum { get; set; }
public string Content { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.BBS.Application.Contracts.Forum.Dtos
{
/// <summary>
/// Plate输入创建对象
/// </summary>
public class PlateCreateInputVo
{
public long Id { get; set; }
public string Title { get; set; }
public string PlateType { get; set; }
public string Introduction { get; set; }
public DateTime? CreateTime { get; set; }
public int AgreeNum { get; set; }
public int SeeNum { get; set; }
public string Content { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
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 PlateGetListInputVo : PagedAndSortedResultRequestDto
{
public long Id { get; set; }
public string Title { get; set; }
public string PlateType { get; set; }
public string Introduction { get; set; }
public DateTime? CreateTime { get; set; }
public int AgreeNum { get; set; }
public int SeeNum { get; set; }
public string Content { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
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 PlateGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public string Title { get; set; }
public string PlateType { get; set; }
public string Introduction { get; set; }
public DateTime? CreateTime { get; set; }
public int AgreeNum { get; set; }
public int SeeNum { get; set; }
public string Content { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
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 PlateUpdateInputVo
{
public long Id { get; set; }
public string Title { get; set; }
public string PlateType { get; set; }
public string Introduction { get; set; }
public DateTime? CreateTime { get; set; }
public int AgreeNum { get; set; }
public int SeeNum { get; set; }
public string Content { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
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>
/// Plate<74><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public interface IPlateService : ICrudAppService<PlateGetOutputDto, PlateGetListOutputDto, long, PlateGetListInputVo, PlateCreateInputVo, PlateUpdateInputVo>
{
}
}

View File

@@ -0,0 +1,23 @@
using AutoMapper;
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.Domain.Forum.Entities;
namespace Yi.BBS.Application.Forum.MapperConfig
{
public class PlateProfile: Profile
{
public PlateProfile()
{
CreateMap<PlateGetListInputVo, PlateEntity>();
CreateMap<PlateCreateInputVo, PlateEntity>();
CreateMap<PlateUpdateInputVo, PlateEntity>();
CreateMap<PlateEntity, PlateGetListOutputDto>();
CreateMap<PlateEntity, PlateGetOutputDto>();
}
}
}

View File

@@ -0,0 +1,17 @@
using Yi.BBS.Application.Contracts.Forum;
using NET.AutoWebApi.Setting;
using Yi.BBS.Application.Contracts.Forum.Dtos;
using Yi.BBS.Domain.Forum.Entities;
using Yi.Framework.Ddd.Services;
namespace Yi.BBS.Application.Forum
{
/// <summary>
/// Plate服务实现
/// </summary>
[AppService]
public class PlateService : CrudAppService<PlateEntity, PlateGetOutputDto, PlateGetListOutputDto, long, PlateGetListInputVo, PlateCreateInputVo, PlateUpdateInputVo>,
IPlateService, IAutoApiService
{
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.BBS.Domain.Shared.Forum.ConstClasses
{
/// <summary>
/// 常量定义
/// </summary>
public class PlateConst
{
}
}

View File

@@ -0,0 +1,27 @@
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.BBS.Domain.Forum.Entities
{
[SugarTable("Plate")]
public class PlateEntity : IEntity<long>, ISoftDelete
{
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; }
public string Title { get; set; }
public string PlateType { get; set; }
public string Introduction { get; set; }
public DateTime? CreateTime { get; set; }
public int AgreeNum { get; set; }
public int SeeNum { get; set; }
public string Content { get; set; }
public bool IsDeleted { get; set; }
}
}