From 99787950a8c729ba19e2dd3f02913e6bc83e756a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Wed, 25 Jan 2023 17:48:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E4=B8=9A=E5=8A=A1=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../YiJwtAuthenticationHandler.cs | 2 +- .../Extensions/AutoMapperExtensions.cs | 1 + .../Repositories/SqlsugarRepository.cs | 5 ++ .../Exceptions/AuthException.cs | 4 +- .../Exceptions/BusinessException.cs | 4 +- .../Exceptions/ExceptionExtensions.cs | 4 +- .../Exceptions/IHasErrorCode.cs | 2 +- .../Exceptions/UserFriendlyException.cs | 20 ++++- .../Yi.Framework.Ddd/Entities/Entity.cs | 2 +- .../Yi.Framework.Ddd/Entities/IEntity.cs | 2 +- .../Repositories/IRepository.cs | 1 + .../Services/CrudAppService.cs | 16 +++- .../Services/ReadOnlyAppService.cs | 4 +- .../module/Yi.Framework.Template/Program.cs | 10 +++ .../Server/CreateInputVoTemplateProvider.cs | 2 +- .../Server/GetListInputVoTemplateProvider.cs | 2 +- .../GetListOutputDtoTemplateProvider.cs | 2 +- .../Server/UpdateInputVoTemplateProvider.cs | 2 +- .../Template/Server/IServiceTemplate.txt | 2 +- .../src/project/BBS/GlobalUsings.cs | 3 +- .../ApplicationContractsSwaggerDoc.xml | 35 +++++++- .../ApplicationSwaggerDoc.xml | 53 ++++++++++++ .../Yi.BBS.Web/Properties/launchSettings.json | 2 +- .../project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db | Bin 20480 -> 53248 bytes .../Dtos/Banner/BannerCreateInputVo.cs | 18 +++++ .../Dtos/Banner/BannerGetListInputVo.cs | 13 +++ .../Dtos/Banner/BannerGetListOutputDto.cs | 17 ++++ .../Dtos/Banner/BannerGetOutputDto.cs | 17 ++++ .../Dtos/Banner/BannerUpdateInputVo.cs | 15 ++++ .../Exhibition/IBannerService.cs | 19 +++++ .../DiscussCreateInputVo.cs} | 11 +-- .../Dtos/Discuss/DiscussGetListInputVo.cs | 13 +++ .../DiscussGetListOutputDto.cs} | 9 ++- .../DiscussGetOutputDto.cs} | 7 +- .../DiscussUpdateInputVo.cs} | 10 +-- .../Forum/Dtos/Plate/PlateCreateInputVo.cs | 19 +++++ .../Forum/Dtos/Plate/PlateGetListInputVo.cs | 17 ++++ .../Forum/Dtos/Plate/PlateGetListOutputDto.cs | 17 ++++ .../Forum/Dtos/Plate/PlateGetOutputDto.cs | 10 +-- .../Forum/Dtos/Plate/PlateUpdateInputVo.cs | 16 ++++ .../Forum/IDiscussService.cs | 19 +++++ .../Forum/IPlateService.cs | 3 +- .../GlobalSetting/Dtos/Temp/ActionJwtDto.cs | 16 ++++ .../GlobalSetting/Dtos/Temp/LoginDto.cs | 29 +++++++ .../GlobalSetting/ISettingService.cs | 21 +++++ .../Exhibition/BannerService.cs | 18 +++++ .../Exhibition/MapperConfig/BannerProfile.cs | 24 ++++++ .../Forum/DiscussService.cs | 27 +++++++ .../Forum/MapperConfig/DiscussProfile.cs | 24 ++++++ .../Forum/MapperConfig/PlateProfile.cs | 1 + .../Yi.BBS.Application/Forum/PlateService.cs | 1 + .../GlobalSetting/SettingService.cs | 25 ++++++ .../GlobalSetting/TempService.cs | 76 ++++++++++++++++++ .../Yi.BBS.Domain.Shared/BbsHttpStatusEnum.cs | 13 +++ .../Exhibition/ConstClasses/BannerConst.cs | 16 ++++ .../Forum/ConstClasses/DiscussConst.cs | 16 ++++ .../Exhibition/Entities/BannerEntity.cs | 22 +++++ .../Forum/Entities/DiscussEntity.cs | 39 +++++++++ .../Forum/Entities/PlateEntity.cs | 11 +-- .../GlobalSetting/Entities/SettingEntity.cs | 24 ++++++ 60 files changed, 773 insertions(+), 60 deletions(-) create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerCreateInputVo.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetListInputVo.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetListOutputDto.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetOutputDto.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerUpdateInputVo.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/IBannerService.cs rename Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/{PlateCreateInputVo.cs => Discuss/DiscussCreateInputVo.cs} (61%) create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussGetListInputVo.cs rename Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/{PlateGetListOutputDto.cs => Discuss/DiscussGetListOutputDto.cs} (62%) rename Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/{PlateGetListInputVo.cs => Discuss/DiscussGetOutputDto.cs} (70%) rename Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/{PlateUpdateInputVo.cs => Discuss/DiscussUpdateInputVo.cs} (60%) create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateCreateInputVo.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetListInputVo.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetListOutputDto.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateUpdateInputVo.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/IDiscussService.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/Dtos/Temp/ActionJwtDto.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/Dtos/Temp/LoginDto.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/ISettingService.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Exhibition/BannerService.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Exhibition/MapperConfig/BannerProfile.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/DiscussService.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/MapperConfig/DiscussProfile.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/GlobalSetting/SettingService.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/GlobalSetting/TempService.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/BbsHttpStatusEnum.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/Exhibition/ConstClasses/BannerConst.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/Forum/ConstClasses/DiscussConst.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Exhibition/Entities/BannerEntity.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/DiscussEntity.cs create mode 100644 Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/GlobalSetting/Entities/SettingEntity.cs diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Auth.JwtBearer/Authentication/YiJwtAuthenticationHandler.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Auth.JwtBearer/Authentication/YiJwtAuthenticationHandler.cs index ef236eaf..4c1cf792 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Auth.JwtBearer/Authentication/YiJwtAuthenticationHandler.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Auth.JwtBearer/Authentication/YiJwtAuthenticationHandler.cs @@ -73,7 +73,7 @@ namespace Yi.Framework.Auth.JwtBearer.Authentication AuthenticateResult result = AuthenticateResult.Fail("未发现授权令牌"); _context.Request.Headers.TryGetValue("Authorization", out StringValues values); string valStr = values.ToString(); - if (!string.IsNullOrWhiteSpace(valStr)) + if (!string.IsNullOrWhiteSpace(valStr) && valStr.Length>10) { var tokenHeader = valStr.Substring(0, 6); if (tokenHeader == "Bearer") diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.AutoMapper/Extensions/AutoMapperExtensions.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.AutoMapper/Extensions/AutoMapperExtensions.cs index 36b886a5..c5af7d8a 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.AutoMapper/Extensions/AutoMapperExtensions.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.AutoMapper/Extensions/AutoMapperExtensions.cs @@ -26,6 +26,7 @@ namespace Yi.Framework.Autofac.Extensions } }); + services.AddAutoMapper(profileList.ToArray()); return services; } diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Repositories/SqlsugarRepository.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Repositories/SqlsugarRepository.cs index 15416ceb..58db3a20 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Repositories/SqlsugarRepository.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Repositories/SqlsugarRepository.cs @@ -41,6 +41,11 @@ namespace Yi.Framework.Core.Sqlsugar.Repositories } + public async Task UpdateIgnoreNullAsync(T updateObj) + { + return await _Db.Updateable(updateObj).IgnoreColumns(true).ExecuteCommandAsync() > 0; + } + public override async Task DeleteAsync(T deleteObj) { //逻辑删除 diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/AuthException.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/AuthException.cs index 8ce9561d..f784cfe3 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/AuthException.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/AuthException.cs @@ -14,7 +14,7 @@ namespace Yi.Framework.Core.Exceptions IHasErrorDetails, IHasLogLevel { - public ResultCodeEnum Code { get; set; } + public int Code { get; set; } public string? Details { get; set; } @@ -28,7 +28,7 @@ namespace Yi.Framework.Core.Exceptions LogLevel logLevel = LogLevel.Warning) : base(message, innerException) { - Code = code; + Code =(int) code; Details = details; LogLevel = logLevel; } diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/BusinessException.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/BusinessException.cs index 61041f19..2c04d34d 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/BusinessException.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/BusinessException.cs @@ -14,14 +14,14 @@ namespace Yi.Framework.Core.Exceptions IHasErrorDetails, IHasLogLevel { - public ResultCodeEnum Code { get; set; } + public int Code { get; set; } public string? Details { get; set; } public LogLevel LogLevel { get; set; } public BusinessException( - ResultCodeEnum code = ResultCodeEnum.NotSuccess, + int code = (int)ResultCodeEnum.NotSuccess, string? message = null, string? details = null, Exception? innerException = null, diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/ExceptionExtensions.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/ExceptionExtensions.cs index e7e21cb4..1a9e5b59 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/ExceptionExtensions.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/ExceptionExtensions.cs @@ -35,8 +35,8 @@ public static class ExceptionExtensions /// /// /// - public static ResultCodeEnum GetLogErrorCode(this Exception exception, ResultCodeEnum defaultCode = ResultCodeEnum.NotSuccess) + public static int GetLogErrorCode(this Exception exception, ResultCodeEnum defaultCode = ResultCodeEnum.NotSuccess) { - return (exception as IHasErrorCode)?.Code ?? defaultCode; + return (exception as IHasErrorCode)?.Code ?? (int)defaultCode; } } diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/IHasErrorCode.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/IHasErrorCode.cs index fa49d5ec..d57e891b 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/IHasErrorCode.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/IHasErrorCode.cs @@ -9,6 +9,6 @@ namespace Yi.Framework.Core.Exceptions { internal interface IHasErrorCode { - ResultCodeEnum Code { get; } + int Code { get; } } } diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/UserFriendlyException.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/UserFriendlyException.cs index 16033c68..35084ab5 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/UserFriendlyException.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Exceptions/UserFriendlyException.cs @@ -9,8 +9,24 @@ using Yi.Framework.Core.Enums; namespace Yi.Framework.Core.Exceptions { - public class UserFriendlyException: BusinessException + public class UserFriendlyException : BusinessException { + public UserFriendlyException( +string message, +int code = (int)ResultCodeEnum.NotSuccess, +string? details = null, +Exception? innerException = null, +LogLevel logLevel = LogLevel.Warning) +: base( + code, + message, + details, + innerException, + logLevel) + { + Details = details; + } + public UserFriendlyException( string message, ResultCodeEnum code = ResultCodeEnum.NotSuccess, @@ -18,7 +34,7 @@ namespace Yi.Framework.Core.Exceptions Exception? innerException = null, LogLevel logLevel = LogLevel.Warning) : base( - code, + (int)code, message, details, innerException, diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Entities/Entity.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Entities/Entity.cs index 0b1b695c..4806933e 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Entities/Entity.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Entities/Entity.cs @@ -26,7 +26,7 @@ namespace Yi.Framework.Ddd.Entities [Serializable] public abstract class Entity : Entity, IEntity, IEntity { - public virtual TKey Id { get; protected set; } + public virtual TKey Id { get; set; } protected Entity() { diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Entities/IEntity.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Entities/IEntity.cs index 4537ff2a..cd9753f4 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Entities/IEntity.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Entities/IEntity.cs @@ -18,6 +18,6 @@ namespace Yi.Framework.Ddd.Entities // // 摘要: // Unique identifier for this entity. - TKey Id { get;} + TKey Id { get; set; } } } diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Repositories/IRepository.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Repositories/IRepository.cs index d744ce94..a8a31f70 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Repositories/IRepository.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Repositories/IRepository.cs @@ -43,6 +43,7 @@ namespace Yi.Framework.Ddd.Repositories Task UpdateAsync(T updateObj); Task UpdateRangeAsync(List updateObjs); Task UpdateAsync(Expression> columns, Expression> whereExpression); + Task UpdateIgnoreNullAsync(T updateObj); //删除 Task DeleteAsync(T deleteObj); diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/CrudAppService.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/CrudAppService.cs index bb89fe81..b61590d8 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/CrudAppService.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/CrudAppService.cs @@ -82,6 +82,12 @@ namespace Yi.Framework.Ddd.Services return Task.CompletedTask; } + protected virtual Task MapToEntityAsync(TUpdateInput updateInput) + { + var entity = _mapper.Map(updateInput); + return Task.FromResult(entity); + } + /// /// 增 /// @@ -125,12 +131,14 @@ namespace Yi.Framework.Ddd.Services { throw new ArgumentNullException(nameof(id)); } - var entity = await _repository.GetByIdAsync(id); + + var entity = await MapToEntityAsync(input); + entity.Id = id; + await _repository.UpdateIgnoreNullAsync(entity); - await MapToEntityAsync(input, entity); - await _repository.UpdateAsync(entity); + var newEntity = await _repository.GetByIdAsync(id); - return await MapToGetOutputDtoAsync(entity); + return await MapToGetOutputDtoAsync(newEntity); } } } diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/ReadOnlyAppService.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/ReadOnlyAppService.cs index 0ff2b834..4a6f40ba 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/ReadOnlyAppService.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/ReadOnlyAppService.cs @@ -62,7 +62,7 @@ where TEntityDto : IEntityDto /// /// /// - public async Task GetAsync(TKey id) + public virtual async Task GetAsync(TKey id) { if (id is null) { @@ -79,7 +79,7 @@ where TEntityDto : IEntityDto /// /// /// - public async Task> GetListAsync(TGetListInput input) + public virtual async Task> GetListAsync(TGetListInput input) { var totalCount = await _repository.CountAsync(_ => true); diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Program.cs b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Program.cs index 9dc287f3..e64d361c 100644 --- a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Program.cs +++ b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Program.cs @@ -7,10 +7,20 @@ TemplateFactory templateFactory = new(); //选择需要生成的模板提供者 +//string modelName = "GlobalSetting"; +//string nameSpaces = "Yi.BBS"; +//List entityNames = new() { "Setting" }; + +//string modelName = "Exhibition"; +//string nameSpaces = "Yi.BBS"; +//List entityNames = new() { "Banner" }; string modelName = "Forum"; string nameSpaces = "Yi.BBS"; List entityNames = new() { "Plate" }; + + + foreach (var entityName in entityNames) { templateFactory.CreateTemplateProviders((option) => diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/CreateInputVoTemplateProvider.cs b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/CreateInputVoTemplateProvider.cs index faedd408..77ae54aa 100644 --- a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/CreateInputVoTemplateProvider.cs +++ b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/CreateInputVoTemplateProvider.cs @@ -12,7 +12,7 @@ namespace Yi.Framework.Template.Provider.Server { public CreateInputVoTemplateProvider(string modelName, string entityName, string nameSpaces) : base(modelName, entityName, nameSpaces) { - BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}CreateInputVo.cs"; + BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}\{TemplateConst.EntityName}CreateInputVo.cs"; TemplatePath = $@"..\..\..\Template\Server\CreateInputVoTemplate.txt"; EntityPath = $@"{TemplateConst.BuildEntityPath}\{nameSpaces}.Domain\{TemplateConst.ModelName}\Entities\{TemplateConst.EntityName}Entity.cs"; } diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/GetListInputVoTemplateProvider.cs b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/GetListInputVoTemplateProvider.cs index f3542b43..01b31e5c 100644 --- a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/GetListInputVoTemplateProvider.cs +++ b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/GetListInputVoTemplateProvider.cs @@ -12,7 +12,7 @@ namespace Yi.Framework.Template.Provider.Server { public GetListInputVoTemplateProvider(string modelName, string entityName, string nameSpaces) : base(modelName, entityName, nameSpaces) { - BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}GetListInputVo.cs"; + BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}\{TemplateConst.EntityName}GetListInputVo.cs"; TemplatePath = $@"..\..\..\Template\Server\GetListInputVoTemplate.txt"; EntityPath = $@"{TemplateConst.BuildEntityPath}\{nameSpaces}.Domain\{TemplateConst.ModelName}\Entities\{TemplateConst.EntityName}Entity.cs"; } diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/GetListOutputDtoTemplateProvider.cs b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/GetListOutputDtoTemplateProvider.cs index 100b3b0f..b36f9f97 100644 --- a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/GetListOutputDtoTemplateProvider.cs +++ b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/GetListOutputDtoTemplateProvider.cs @@ -12,7 +12,7 @@ namespace Yi.Framework.Template.Provider.Server { public GetListOutputDtoTemplateProvider(string modelName, string entityName, string nameSpaces) : base(modelName, entityName, nameSpaces) { - BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}GetListOutputDto.cs"; + BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}\{TemplateConst.EntityName}GetListOutputDto.cs"; TemplatePath = $@"..\..\..\Template\Server\GetListOutputDtoTemplate.txt"; EntityPath = $@"{TemplateConst.BuildEntityPath}\{nameSpaces}.Domain\{TemplateConst.ModelName}\Entities\{TemplateConst.EntityName}Entity.cs"; } diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/UpdateInputVoTemplateProvider.cs b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/UpdateInputVoTemplateProvider.cs index ed7db631..981a9449 100644 --- a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/UpdateInputVoTemplateProvider.cs +++ b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Provider/Server/UpdateInputVoTemplateProvider.cs @@ -12,7 +12,7 @@ namespace Yi.Framework.Template.Provider.Server { public UpdateInputVoTemplateProvider(string modelName, string entityName, string nameSpaces) : base(modelName, entityName, nameSpaces) { - BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}UpdateInputVo.cs"; + BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}\{TemplateConst.EntityName}UpdateInputVo.cs"; TemplatePath = $@"..\..\..\Template\Server\UpdateInputVoTemplate.txt"; EntityPath = $@"{TemplateConst.BuildEntityPath}\{nameSpaces}.Domain\{TemplateConst.ModelName}\Entities\{TemplateConst.EntityName}Entity.cs"; } diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Template/Server/IServiceTemplate.txt b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Template/Server/IServiceTemplate.txt index 8e8b86be..1142b1b5 100644 --- a/Yi.Framework.Net6/src/module/Yi.Framework.Template/Template/Server/IServiceTemplate.txt +++ b/Yi.Framework.Net6/src/module/Yi.Framework.Template/Template/Server/IServiceTemplate.txt @@ -9,7 +9,7 @@ using Yi.Framework.Ddd.Services.Abstract; namespace #NameSpaces#.Application.Contracts.#ModelName# { /// - /// #EntityName# + /// #EntityName#服务抽象 /// public interface I#EntityName#Service : ICrudAppService<#EntityName#GetOutputDto, #EntityName#GetListOutputDto, long, #EntityName#GetListInputVo, #EntityName#CreateInputVo, #EntityName#UpdateInputVo> { diff --git a/Yi.Framework.Net6/src/project/BBS/GlobalUsings.cs b/Yi.Framework.Net6/src/project/BBS/GlobalUsings.cs index 71ceb406..d6ecb816 100644 --- a/Yi.Framework.Net6/src/project/BBS/GlobalUsings.cs +++ b/Yi.Framework.Net6/src/project/BBS/GlobalUsings.cs @@ -1,3 +1,4 @@ global using Yi.Framework.Core.Attributes; global using Yi.Framework.Core.Helper; -global using Yi.Framework.Core.Model; \ No newline at end of file +global using Yi.Framework.Core.Model; +global using Yi.Framework.Core.Exceptions; \ No newline at end of file diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Application.Contracts/ApplicationContractsSwaggerDoc.xml b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Application.Contracts/ApplicationContractsSwaggerDoc.xml index 152a55ff..51871bf0 100644 --- a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Application.Contracts/ApplicationContractsSwaggerDoc.xml +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Application.Contracts/ApplicationContractsSwaggerDoc.xml @@ -4,15 +4,46 @@ Yi.BBS.Application.Contracts - + + + Banner输入创建对象 + + + + + Banner抽象 + + + + + Discuss输入创建对象 + + + Plate输入创建对象 + + + Discuss服务抽象 + + - Plate������� + Plate服务抽象 + + + Setting应用抽象 + + + + + 获取配置标题 + + + diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Application/ApplicationSwaggerDoc.xml b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Application/ApplicationSwaggerDoc.xml index 05e1dc4d..5a9e6fa0 100644 --- a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Application/ApplicationSwaggerDoc.xml +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Application/ApplicationSwaggerDoc.xml @@ -4,10 +4,63 @@ Yi.BBS.Application + + + Banner服务实现 + + + + + Discuss服务实现 + + Plate服务实现 + + + Setting服务实现 + + + + + 获取配置标题 + + + + + + + 临时服务,之后用其他模块代替 + + + + + 登录 + + + + + + + 判断是否有登录 + + + + + + 退出登录 + + + + + + 获取用户信息 + + + + diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Properties/launchSettings.json b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Properties/launchSettings.json index 1f81c189..a6e70595 100644 --- a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Properties/launchSettings.json +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Properties/launchSettings.json @@ -4,7 +4,7 @@ "Yi.BBS.Web": { "commandName": "Project", "dotnetRunMessages": true, - "launchBrowser": true, + "launchBrowser": false, "launchUrl": "swagger", "applicationUrl": "http://localhost:19003", "environmentVariables": { diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db index 6b48b71a1d7d40a1f1bf61e367a71319713290fe..c9071c58ad53e8d77e563a28560526664a956c96 100644 GIT binary patch literal 53248 zcmeI*PfXiZ90zba0Vm`SW<_e0=JJ$@sZj@s9gqrBwE>N`XpCh*HE{}tc)?YOX<{b2 zNtFs(rK!6zX}4Y~wTEdM(xgoqhaRh)R_#!2S13E|utN_V_xzp{@*jjMpwrh1*m>{S ze*XO4^9yleWB2cy*~y9f@7YH{~);Cd#8Kb|D@f@NQVFfAOL|{fz62D6N*H{ zdqGQEEa=yb^3qzl?92j_GpX^p6qy^Jm`ahTlN!Ao^hMLTC|NY}M$sbEAJ38L8&gvx zGn4*kd}f|}n3^YV(=v00RnVj4bFH+rtd%aSiA3zMFfVa?RWElekuF*#Gq<*68D_Du zpuJDFnaPr_S^Au@Lid)VOBP+?RbtuW`I4?rudPH0t*)NeOAWP{?U*}h(v^x<v}=AbVgR=#a7J}XoXv85<+4dcRZd@I4pkkDT~g8RxIiz{@Yt0 z8=iRV&`fK#Rfot-nR&CZK=ptoPjo`etoW{O( z7~IU;}KCXiaC9~e5*iT&1bbW%Vf{9&H#{AoP}V}5WMzia>Xl!-VL`~jh~yc z3ZM6ET*V-8Pm9%|?*yY_@t-?!OHwJ$X;+x3YBeX*EN3SA4e zYlZ9xvI?8|Zh! z%ijy~p8S-~FhKwU5P$##AOHafKmY;|fB*y_aMl8s+>#V=^?NUtS06uf^|^L;9_&5b zQH5U>HF?QZmnZT(h2@1sNeUmXC-6L$<)g>smj4vwm-0THVS)ezAOHafKmY;|fB*y_ z009U<;I$G6xFxajMuEHLiRkjXr5-1TeZXIop9u7U2?7v+00bZa0SG_<0uX=z1Rwx` z^D1yn^hx3V@H?Vte=gvU-rpwrgcm>E|NDn6`k?^+u)p{=m{11QVWOyGBco%(>d;7H zG~lDz_Vs^Jeo3$YpVtFKy&wPq2tWV=5P$##AOHafKmY;|IEeti{?FekU^n>dJIPkC z4g??o0SG_<0uX=z1Rwwb2tWV=uZw_v{h!|S9}@&1009U<00Izz00bZa0SG_<0{>$H z`})5q|02)_CI~Cxw0}1GoO}8& zTh?lMEFL$8lIm4D4Xxk)B5r^GKb}zH>PUR?=8arx=;o@Pe{*^{G00bZa z0SG_<0uX=z1Rwx`(-*+~|4-i>dxQW4AOHafKmY;|fB*y_009V`r2y{#f0p{#Hv}L6 W0SG_<0uX=z1Rwwb2teR;1pWh-P + /// Banner输入创建对象 + /// + public class BannerCreateInputVo + { + public string Name { get; set; } + public string? Logo { get; set; } + public string? Color { get; set; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetListInputVo.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetListInputVo.cs new file mode 100644 index 00000000..1fa80272 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetListInputVo.cs @@ -0,0 +1,13 @@ +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 + { + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetListOutputDto.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetListOutputDto.cs new file mode 100644 index 00000000..72c518aa --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetListOutputDto.cs @@ -0,0 +1,17 @@ +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 + { + public long Id { get; set; } + public string Name { get; set; } + public string? Logo { get; set; } + public string? Color { get; set; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetOutputDto.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetOutputDto.cs new file mode 100644 index 00000000..0e900bc3 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerGetOutputDto.cs @@ -0,0 +1,17 @@ +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 + { + public long Id { get; set; } + public string Name { get; set; } + public string? Logo { get; set; } + public string? Color { get; set; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerUpdateInputVo.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerUpdateInputVo.cs new file mode 100644 index 00000000..a4fef3ae --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/Dtos/Banner/BannerUpdateInputVo.cs @@ -0,0 +1,15 @@ +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; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/IBannerService.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/IBannerService.cs new file mode 100644 index 00000000..a488e4fd --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Exhibition/IBannerService.cs @@ -0,0 +1,19 @@ +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 +{ + /// + /// Banner抽象 + /// + public interface IBannerService : ICrudAppService + { + + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateCreateInputVo.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussCreateInputVo.cs similarity index 61% rename from Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateCreateInputVo.cs rename to Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussCreateInputVo.cs index 5a12c669..5a1afc11 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateCreateInputVo.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussCreateInputVo.cs @@ -4,20 +4,21 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.BBS.Application.Contracts.Forum.Dtos +namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss { /// - /// Plate输入创建对象 + /// Discuss输入创建对象 /// - public class PlateCreateInputVo + public class DiscussCreateInputVo { public long Id { get; set; } public string Title { get; set; } - public string PlateType { get; set; } - public string Introduction { get; set; } + public string Types { 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 string? Color { get; set; } } } diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussGetListInputVo.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussGetListInputVo.cs new file mode 100644 index 00000000..a119edd3 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussGetListInputVo.cs @@ -0,0 +1,13 @@ +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.Discuss +{ + public class DiscussGetListInputVo : PagedAndSortedResultRequestDto + { + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateGetListOutputDto.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussGetListOutputDto.cs similarity index 62% rename from Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateGetListOutputDto.cs rename to Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussGetListOutputDto.cs index c061f32a..1ae57b18 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateGetListOutputDto.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussGetListOutputDto.cs @@ -5,17 +5,18 @@ using System.Text; using System.Threading.Tasks; using Yi.Framework.Ddd.Dtos; -namespace Yi.BBS.Application.Contracts.Forum.Dtos +namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss { - public class PlateGetListOutputDto : IEntityDto + public class DiscussGetListOutputDto : IEntityDto { public long Id { get; set; } public string Title { get; set; } - public string PlateType { get; set; } - public string Introduction { get; set; } + public string Types { 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 string? Color { get; set; } } } diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateGetListInputVo.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussGetOutputDto.cs similarity index 70% rename from Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateGetListInputVo.cs rename to Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussGetOutputDto.cs index c470deed..03c10369 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateGetListInputVo.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussGetOutputDto.cs @@ -7,15 +7,16 @@ using Yi.Framework.Ddd.Dtos; namespace Yi.BBS.Application.Contracts.Forum.Dtos { - public class PlateGetListInputVo : PagedAndSortedResultRequestDto + public class DiscussGetOutputDto : IEntityDto { public long Id { get; set; } public string Title { get; set; } - public string PlateType { get; set; } - public string Introduction { get; set; } + public string Types { 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 string? Color { get; set; } } } diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateUpdateInputVo.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussUpdateInputVo.cs similarity index 60% rename from Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateUpdateInputVo.cs rename to Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussUpdateInputVo.cs index b6c573ad..856b0f9b 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/PlateUpdateInputVo.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Discuss/DiscussUpdateInputVo.cs @@ -4,17 +4,17 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Yi.BBS.Application.Contracts.Forum.Dtos +namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss { - public class PlateUpdateInputVo + public class DiscussUpdateInputVo { - public long Id { get; set; } public string Title { get; set; } - public string PlateType { get; set; } - public string Introduction { get; set; } + public string Types { 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 string? Color { get; set; } } } diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateCreateInputVo.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateCreateInputVo.cs new file mode 100644 index 00000000..faa6dace --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateCreateInputVo.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Yi.BBS.Application.Contracts.Forum.Dtos.Plate +{ + /// + /// Plate输入创建对象 + /// + public class PlateCreateInputVo + { + public long Id { get; set; } + public string Name { get; set; } + public string? Logo { get; set; } + public string? Introduction { get; set; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetListInputVo.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetListInputVo.cs new file mode 100644 index 00000000..b814da0d --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetListInputVo.cs @@ -0,0 +1,17 @@ +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; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetListOutputDto.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetListOutputDto.cs new file mode 100644 index 00000000..3415146a --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetListOutputDto.cs @@ -0,0 +1,17 @@ +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 + { + public long Id { get; set; } + public string Name { get; set; } + public string? Logo { get; set; } + public string? Introduction { get; set; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetOutputDto.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetOutputDto.cs index c46f824e..8bc031f1 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetOutputDto.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateGetOutputDto.cs @@ -10,12 +10,8 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos public class PlateGetOutputDto : IEntityDto { 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 string Name { get; set; } + public string? Logo { get; set; } + public string? Introduction { get; set; } } } diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateUpdateInputVo.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateUpdateInputVo.cs new file mode 100644 index 00000000..4567cca6 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/Dtos/Plate/PlateUpdateInputVo.cs @@ -0,0 +1,16 @@ +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; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/IDiscussService.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/IDiscussService.cs new file mode 100644 index 00000000..e03f473c --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/IDiscussService.cs @@ -0,0 +1,19 @@ +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 +{ + /// + /// Discuss服务抽象 + /// + public interface IDiscussService : ICrudAppService + { + + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/IPlateService.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/IPlateService.cs index f34b74c4..3fe9452c 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/IPlateService.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/Forum/IPlateService.cs @@ -4,12 +4,13 @@ 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 { /// - /// Plate������� + /// Plate服务抽象 /// public interface IPlateService : ICrudAppService { diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/Dtos/Temp/ActionJwtDto.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/Dtos/Temp/ActionJwtDto.cs new file mode 100644 index 00000000..d0af2df9 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/Dtos/Temp/ActionJwtDto.cs @@ -0,0 +1,16 @@ +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 int Id { get; set; } + public string ActionName { get; set; } + public string Router { get; set; } + public string Icon { get; set; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/Dtos/Temp/LoginDto.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/Dtos/Temp/LoginDto.cs new file mode 100644 index 00000000..d2897df7 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/Dtos/Temp/LoginDto.cs @@ -0,0 +1,29 @@ +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; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/ISettingService.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/ISettingService.cs new file mode 100644 index 00000000..8820dc26 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application.Contracts/GlobalSetting/ISettingService.cs @@ -0,0 +1,21 @@ +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 +{ + /// + /// Setting应用抽象 + /// + public interface ISettingService : IApplicationService + { + /// + /// 获取配置标题 + /// + /// + Task GetTitleAsync(); + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Exhibition/BannerService.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Exhibition/BannerService.cs new file mode 100644 index 00000000..db630b4e --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Exhibition/BannerService.cs @@ -0,0 +1,18 @@ +using Yi.BBS.Application.Contracts.Exhibition; +using NET.AutoWebApi.Setting; +using Yi.BBS.Application.Contracts.Exhibition.Dtos; +using Yi.BBS.Domain.Exhibition.Entities; +using Yi.Framework.Ddd.Services; +using Yi.BBS.Application.Contracts.Exhibition.Dtos.Banner; + +namespace Yi.BBS.Application.Exhibition +{ + /// + /// Banner服务实现 + /// + [AppService] + public class BannerService : CrudAppService, + IBannerService, IAutoApiService + { + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Exhibition/MapperConfig/BannerProfile.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Exhibition/MapperConfig/BannerProfile.cs new file mode 100644 index 00000000..e13f8199 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Exhibition/MapperConfig/BannerProfile.cs @@ -0,0 +1,24 @@ +using AutoMapper; +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.BBS.Domain.Exhibition.Entities; + +namespace Yi.BBS.Application.Exhibition.MapperConfig +{ + public class BannerProfile: Profile + { + public BannerProfile() + { + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/DiscussService.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/DiscussService.cs new file mode 100644 index 00000000..8075f030 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/DiscussService.cs @@ -0,0 +1,27 @@ +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; +using Yi.BBS.Application.Contracts.Forum.Dtos.Discuss; +using Microsoft.AspNetCore.Mvc; +using Yi.Framework.Ddd.Dtos; + +namespace Yi.BBS.Application.Forum +{ + /// + /// Discuss服务实现 + /// + [AppService] + public class DiscussService : CrudAppService, + IDiscussService, IAutoApiService + { + public async Task> GetPlateIdAsync([FromRoute] long plateId, [FromQuery] DiscussGetListInputVo input) + { + var entities = await _repository.GetPageListAsync(x => x.PlateId == plateId, input); + var items= await MapToGetListOutputDtosAsync(entities); + var total = await _repository.CountAsync(x=>x.IsDeleted==false); + return new PagedResultDto(total, items); + } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/MapperConfig/DiscussProfile.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/MapperConfig/DiscussProfile.cs new file mode 100644 index 00000000..20bfbea4 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/MapperConfig/DiscussProfile.cs @@ -0,0 +1,24 @@ +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.Application.Contracts.Forum.Dtos.Discuss; +using Yi.BBS.Domain.Forum.Entities; + +namespace Yi.BBS.Application.Forum.MapperConfig +{ + public class DiscussProfile: Profile + { + public DiscussProfile() + { + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/MapperConfig/PlateProfile.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/MapperConfig/PlateProfile.cs index 5ab2b17b..41995c1c 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/MapperConfig/PlateProfile.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/MapperConfig/PlateProfile.cs @@ -5,6 +5,7 @@ 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.BBS.Domain.Forum.Entities; namespace Yi.BBS.Application.Forum.MapperConfig diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/PlateService.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/PlateService.cs index dd4835a7..9d062aee 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/PlateService.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/Forum/PlateService.cs @@ -3,6 +3,7 @@ using NET.AutoWebApi.Setting; using Yi.BBS.Application.Contracts.Forum.Dtos; using Yi.BBS.Domain.Forum.Entities; using Yi.Framework.Ddd.Services; +using Yi.BBS.Application.Contracts.Forum.Dtos.Plate; namespace Yi.BBS.Application.Forum { diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/GlobalSetting/SettingService.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/GlobalSetting/SettingService.cs new file mode 100644 index 00000000..598cffde --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/GlobalSetting/SettingService.cs @@ -0,0 +1,25 @@ +using Yi.BBS.Application.Contracts.GlobalSetting; +using NET.AutoWebApi.Setting; +using Yi.BBS.Domain.GlobalSetting.Entities; +using Yi.Framework.Ddd.Services; + +namespace Yi.BBS.Application.GlobalSetting +{ + /// + /// Setting服务实现 + /// + [AppService] + public class SettingService : ApplicationService, + ISettingService, IAutoApiService + { + /// + /// 获取配置标题 + /// + /// + /// + public Task GetTitleAsync() + { + return Task.FromResult("你好世界"); + } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/GlobalSetting/TempService.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/GlobalSetting/TempService.cs new file mode 100644 index 00000000..d440a27e --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Application/GlobalSetting/TempService.cs @@ -0,0 +1,76 @@ +using Yi.BBS.Application.Contracts.GlobalSetting; +using NET.AutoWebApi.Setting; +using Yi.BBS.Domain.GlobalSetting.Entities; +using Yi.Framework.Ddd.Services; +using Microsoft.AspNetCore.Mvc; +using Yi.BBS.Application.Contracts.GlobalSetting.Dtos.Temp; +using Yi.BBS.Domain.Shared; + +namespace Yi.BBS.Application.GlobalSetting +{ + /// + ///临时服务,之后用其他模块代替 + /// + [AppService] + public class TempService : ApplicationService, IAutoApiService + { + /// + /// 登录 + /// + /// + /// + [Route("/api/account/login")] + public Task PostLoginAsync() + { + bool loginSucces = true; + if (!loginSucces) + { + throw new UserFriendlyException("登录失败", (int)BbsHttpStatusEnum.LoginFailed, "用户或者密码错误"); + } + var dto = new LoginDto("token"); + dto.User = new LoginUserInfoDto { Icon = "", Id = 0, Level = 1, UserName = "橙子" }; + return Task.FromResult(dto); + } + + /// + /// 判断是否有登录 + /// + /// + [Route("/api/account/logged")] + public Task PostLogged() + { + return Task.FromResult(true); + } + + /// + /// 退出登录 + /// + /// + [Route("/api/account/logout")] + public Task PostlogOut() + { + return Task.CompletedTask; + } + + /// + /// 获取用户信息 + /// + /// + /// + [Route("/api/account/user/{id}")] + public Task> GetUserInfoByIdAsync(long id) + { + var dto = new List(); + dto.Add(new ActionJwtDto { Router = "/index", ActionName = "首页" }); + //dto.Add(new ActionJwtDto { Router = "", ActionName = "" }); + //dto.Add(new ActionJwtDto { Router = "", ActionName = "" }); + //dto.Add(new ActionJwtDto { Router = "", ActionName = "" }); + //dto.Add(new ActionJwtDto { Router = "", ActionName = "" }); + //dto.Add(new ActionJwtDto { Router = "", ActionName = "" }); + //dto.Add(new ActionJwtDto { Router = "", ActionName = "" }); + //dto.Add(new ActionJwtDto { Router = "", ActionName = "" }); + //dto.Add(new ActionJwtDto { Router = "", ActionName = "" }); + return Task.FromResult(dto); + } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/BbsHttpStatusEnum.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/BbsHttpStatusEnum.cs new file mode 100644 index 00000000..565409f3 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/BbsHttpStatusEnum.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Yi.BBS.Domain.Shared +{ + public enum BbsHttpStatusEnum + { + LoginFailed=1900 + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/Exhibition/ConstClasses/BannerConst.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/Exhibition/ConstClasses/BannerConst.cs new file mode 100644 index 00000000..1df938a8 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/Exhibition/ConstClasses/BannerConst.cs @@ -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.Exhibition.ConstClasses +{ + /// + /// 常量定义 + /// + + public class BannerConst + { + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/Forum/ConstClasses/DiscussConst.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/Forum/ConstClasses/DiscussConst.cs new file mode 100644 index 00000000..7f8531a2 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain.Shared/Forum/ConstClasses/DiscussConst.cs @@ -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 +{ + /// + /// 常量定义 + /// + + public class DiscussConst + { + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Exhibition/Entities/BannerEntity.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Exhibition/Entities/BannerEntity.cs new file mode 100644 index 00000000..942429b6 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Exhibition/Entities/BannerEntity.cs @@ -0,0 +1,22 @@ +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.Exhibition.Entities +{ + [SugarTable("Banner")] + public class BannerEntity : IEntity, ISoftDelete + { + [SugarColumn(IsPrimaryKey = true)] + public long Id { get; set; } + public string Name { get; set; } + public string? Logo { get; set; } + public string? Color { get; set; } + public bool IsDeleted { get; set; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/DiscussEntity.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/DiscussEntity.cs new file mode 100644 index 00000000..bc75096d --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/DiscussEntity.cs @@ -0,0 +1,39 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Linq; +using Yi.Framework.Data.Entities; +using Yi.Framework.Ddd.Entities; + +namespace Yi.BBS.Domain.Forum.Entities +{ + [SugarTable("Discuss")] + public class DiscussEntity : IEntity, ISoftDelete + { + public DiscussEntity(long plateId) + { + PlateId = plateId; + } + + [SugarColumn(IsPrimaryKey = true)] + public long Id { get; set; } + public string Title { get; set; } + public string Types { 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 string? Color { get; set; } + + public bool IsDeleted { get; set; } + + + public long PlateId { get; set; } + } +} diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/PlateEntity.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/PlateEntity.cs index 218d8bab..096ec0d0 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/PlateEntity.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Forum/Entities/PlateEntity.cs @@ -14,14 +14,9 @@ namespace Yi.BBS.Domain.Forum.Entities { [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 string Name { get; set; } + public string? Logo { get; set; } + public string? Introduction { get; set; } public bool IsDeleted { get; set; } } } diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/GlobalSetting/Entities/SettingEntity.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/GlobalSetting/Entities/SettingEntity.cs new file mode 100644 index 00000000..69433035 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/GlobalSetting/Entities/SettingEntity.cs @@ -0,0 +1,24 @@ +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.GlobalSetting.Entities +{ + [SugarTable("Setting")] + public class SettingEntity : IEntity + { + + [SugarColumn(IsPrimaryKey = true)] + public long Id { get; set; } + public int CommentPage { get; set; } + public int DiscussPage { get; set; } + public int CommentExperience { get; set; } + public int DiscussExperience { get; set; } + public string Title { get; set; } + } +}