diff --git a/src/LinCms.Application.Contracts/Base/Docs/CreateUpdateDocDto.cs b/src/LinCms.Application.Contracts/Base/Docs/CreateUpdateDocDto.cs deleted file mode 100644 index bdedf307..00000000 --- a/src/LinCms.Application.Contracts/Base/Docs/CreateUpdateDocDto.cs +++ /dev/null @@ -1,9 +0,0 @@ - -namespace LinCms.Base.Docs; - -public class CreateUpdateDocDto -{ - public string Name { get; set; } - - public string DisplayName { get; set; } -} \ No newline at end of file diff --git a/src/LinCms.Application.Contracts/Base/Docs/DocDto.cs b/src/LinCms.Application.Contracts/Base/Docs/DocDto.cs deleted file mode 100644 index 784f716f..00000000 --- a/src/LinCms.Application.Contracts/Base/Docs/DocDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -using IGeekFan.FreeKit.Extras.AuditEntity; - -namespace LinCms.Base.Docs; - -public class DocDto : EntityDto -{ - public string Name { get; set; } - - public string DisplayName { get; set; } - -} \ No newline at end of file diff --git a/src/LinCms.Application.Contracts/Base/Docs/IDocService.cs b/src/LinCms.Application.Contracts/Base/Docs/IDocService.cs deleted file mode 100644 index 8e3740a2..00000000 --- a/src/LinCms.Application.Contracts/Base/Docs/IDocService.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Threading.Tasks; -using IGeekFan.FreeKit.Extras.Dto; -using LinCms.Data; - -namespace LinCms.Base.Docs; - -public interface IDocService -{ - Task DeleteAsync(long id); - - Task> GetListAsync(PageDto pageDto); - - Task GetAsync(long id); - - Task CreateAsync(CreateUpdateDocDto createDoc); - - Task UpdateAsync(long id, CreateUpdateDocDto updateDoc); -} \ No newline at end of file diff --git a/src/LinCms.Application/Base/Docs/DocProfile.cs b/src/LinCms.Application/Base/Docs/DocProfile.cs deleted file mode 100644 index 3c2de2e5..00000000 --- a/src/LinCms.Application/Base/Docs/DocProfile.cs +++ /dev/null @@ -1,13 +0,0 @@ -using AutoMapper; -using LinCms.Entities.Base; - -namespace LinCms.Base.Docs; - -public class DocProfile : Profile -{ - public DocProfile() - { - CreateMap(); - CreateMap(); - } -} \ No newline at end of file diff --git a/src/LinCms.Application/Base/Docs/DocService.cs b/src/LinCms.Application/Base/Docs/DocService.cs deleted file mode 100644 index d9b25a21..00000000 --- a/src/LinCms.Application/Base/Docs/DocService.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using IGeekFan.FreeKit.Extras.Dto; -using IGeekFan.FreeKit.Extras.FreeSql; -using LinCms.Data; -using LinCms.Entities.Base; -using LinCms.Exceptions; -using LinCms.Extensions; - -namespace LinCms.Base.Docs; - -public class DocService(IAuditBaseRepository repository) : ApplicationService, IDocService -{ - public async Task DeleteAsync(long id) - { - await repository.DeleteAsync(new Doc { Id = id }); - } - - public async Task> GetListAsync(PageDto pageDto) - { - List docss = (await repository.Select - .ToPagerListAsync(pageDto, out long count)).Select(r => Mapper.Map(r)).ToList(); - - return new PagedResultDto(docss, count); - } - - public async Task GetAsync(long id) - { - Doc doc = await repository.Select.Where(a => a.Id == id).ToOneAsync(); - return Mapper.Map(doc); - } - - public async Task CreateAsync(CreateUpdateDocDto createDoc) - { - Doc doc = Mapper.Map(createDoc); - await repository.InsertAsync(doc); - } - - public async Task UpdateAsync(long id, CreateUpdateDocDto updateDoc) - { - Doc doc = await repository.Select.Where(r => r.Id == id).ToOneAsync(); - if (doc == null) - { - throw new LinCmsException("该数据不存在"); - } - Mapper.Map(updateDoc, doc); - await repository.UpdateAsync(doc); - } -} \ No newline at end of file diff --git a/src/LinCms.Application/Cms/Account/AccountContracts.cs b/src/LinCms.Application/Cms/Account/AccountContracts.cs index 9e69e9c7..2f5e990a 100644 --- a/src/LinCms.Application/Cms/Account/AccountContracts.cs +++ b/src/LinCms.Application/Cms/Account/AccountContracts.cs @@ -6,16 +6,21 @@ public class AccountContracts /// 注册返回的uuid值 /// public static string SendEmailCode_EmailCode = "AccountService.SendEmailCode.EmailCode.{0}"; + /// /// 注册时缓存的邮件验证码 /// public static string SendEmailCode_VerificationCode = "AccountService.SendEmailCode.VerificationCode.{0}"; - + /// /// 重置密码时邮件验证码 /// - public static string SendPasswordResetCode_VerificationCode = "AccountService.SendPasswordResetCode.VerificationCode.{0}"; - - public static string SendPasswordResetCode_VerificationCode_Count = "AccountService.SendPasswordResetCode.VerificationCode.{0}.Count"; + public static string SendPasswordResetCode_VerificationCode = + "AccountService.SendPasswordResetCode.VerificationCode.{0}"; + /// + /// 重置密码验证码可使用次数 + /// + public static string SendPasswordResetCode_VerificationCode_Count = + "AccountService.SendPasswordResetCode.VerificationCode.{0}.Count"; } \ No newline at end of file diff --git a/src/LinCms.Core/Entities/Base/Doc.cs b/src/LinCms.Core/Entities/Base/Doc.cs deleted file mode 100644 index f3d19ed8..00000000 --- a/src/LinCms.Core/Entities/Base/Doc.cs +++ /dev/null @@ -1,24 +0,0 @@ -using FreeSql.DataAnnotations; -using IGeekFan.FreeKit.Extras.AuditEntity; - -namespace LinCms.Entities.Base -{ - /// - /// 文档---示例代码生成。 - /// - public class Doc : FullAuditEntity - { - /// - /// 文档名 - /// - [Column(StringLength = 50)] - public string Name { get; set; } - - /// - /// 显示名 - /// - [Column(StringLength = 50)] - public string DisplayName { get; set; } - - } -} diff --git a/src/LinCms.Core/LinCms.Core.xml b/src/LinCms.Core/LinCms.Core.xml index 3db45700..ab1055ad 100644 --- a/src/LinCms.Core/LinCms.Core.xml +++ b/src/LinCms.Core/LinCms.Core.xml @@ -381,21 +381,6 @@ 排序码 - - - 文档---示例代码生成。 - - - - - 文档名 - - - - - 显示名 - - 黑名单,实现登录Token的过期 diff --git a/src/LinCms.Web/Controllers/Base/DocController.cs b/src/LinCms.Web/Controllers/Base/DocController.cs deleted file mode 100644 index a4fe8f8c..00000000 --- a/src/LinCms.Web/Controllers/Base/DocController.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Threading.Tasks; -using IGeekFan.FreeKit.Extras.Dto; -using LinCms.Aop.Filter; -using LinCms.Base.Docs; -using LinCms.Data; -using Microsoft.AspNetCore.Mvc; - -namespace LinCms.Controllers.Base; - -/// -/// 简单文档示例,仅仅是一个demo -/// -[ApiExplorerSettings(GroupName = "base")] -[Route("api/base/docs")] -[ApiController] -public class DocController(IDocService docService) : ControllerBase -{ - [LinCmsAuthorize("删除文档", "文档管理")] - [HttpDelete("{id}")] - public async Task DeleteAsync(long id) - { - await docService.DeleteAsync(id); - return UnifyResponseDto.Success(); - - } - - [LinCmsAuthorize("所有文档", "文档管理")] - [HttpGet] - public Task> GetListAsync([FromQuery] PageDto pageDto) - { - return docService.GetListAsync(pageDto); - } - - [HttpGet("{id}")] - public Task GetAsync(long id) - { - return docService.GetAsync(id); - } - - [LinCmsAuthorize("新增文档", "文档管理")] - [HttpPost] - public async Task CreateAsync([FromBody] CreateUpdateDocDto createDoc) - { - await docService.CreateAsync(createDoc); - return UnifyResponseDto.Success("新增文档成功"); - } - - [LinCmsAuthorize("编辑文档", "文档管理")] - [HttpPut("{id}")] - public async Task UpdateAsync(long id, [FromBody] CreateUpdateDocDto updateDoc) - { - await docService.UpdateAsync(id, updateDoc); - return UnifyResponseDto.Success("编辑文档成功"); - } -} \ No newline at end of file diff --git a/src/LinCms.Web/Controllers/Cms/AccountController.cs b/src/LinCms.Web/Controllers/Cms/AccountController.cs index 9db1230e..8ec8d967 100644 --- a/src/LinCms.Web/Controllers/Cms/AccountController.cs +++ b/src/LinCms.Web/Controllers/Cms/AccountController.cs @@ -50,7 +50,7 @@ public AccountController(IComponentContext componentContext, IConfiguration conf /// - /// 生成无状态的登录验证码 + /// 生成无状态的图片验证码 /// /// [AllowAnonymous] diff --git a/src/LinCms.Web/LinCms.Web.xml b/src/LinCms.Web/LinCms.Web.xml index bb3bbe0b..d5602ab6 100644 --- a/src/LinCms.Web/LinCms.Web.xml +++ b/src/LinCms.Web/LinCms.Web.xml @@ -34,16 +34,6 @@ 多语言 - - - 简单文档示例,仅仅是一个demo - - - - - 简单文档示例,仅仅是一个demo - - 语言下的本地化资源 @@ -395,7 +385,7 @@ - 生成无状态的登录验证码 + 生成无状态的图片验证码