From 1ab02633471e83f75660aa8c0f317626f1bcb276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= <454313500@qq.com> Date: Wed, 6 Mar 2024 18:35:34 +0800 Subject: [PATCH 1/4] =?UTF-8?q?style:=20=E6=B7=BB=E5=8A=A0=E5=90=AF?= =?UTF-8?q?=E5=8A=A8logo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs b/Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs index 0feeab19..68c2bb24 100644 --- a/Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs @@ -16,6 +16,16 @@ Log.Logger = new LoggerConfiguration() try { + Log.Information(""" + + __ _ _ + \ \ / (_) + \ \_/ / _ + \ / | | + | | | | + |_| |_| + + """); Log.Information("Yi框架-Abp.vNext,启动!"); var builder = WebApplication.CreateBuilder(args); From 4ce9ee520af188c8a49e748e8226cdb9f2149d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= <454313500@qq.com> Date: Wed, 6 Mar 2024 18:46:33 +0800 Subject: [PATCH 2/4] =?UTF-8?q?style:=20=E5=AE=8C=E5=96=84=E5=AE=8C?= =?UTF-8?q?=E6=95=B4logo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs b/Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs index 68c2bb24..1f0f2e2f 100644 --- a/Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs +++ b/Yi.Abp.Net8/src/Yi.Abp.Web/Program.cs @@ -17,15 +17,15 @@ Log.Logger = new LoggerConfiguration() try { Log.Information(""" - - __ _ _ - \ \ / (_) - \ \_/ / _ - \ / | | - | | | | - |_| |_| - """); + __ ___ ______ _ + \ \ / (_) | ____| | | + \ \_/ / _ | |__ _ __ __ _ _ __ ___ _____ _____ _ __| | __ + \ / | | | __| '__/ _` | '_ ` _ \ / _ \ \ /\ / / _ \| '__| |/ / + | | | | | | | | | (_| | | | | | | __/\ V V / (_) | | | < + |_| |_| |_| |_| \__,_|_| |_| |_|\___| \_/\_/ \___/|_| |_|\_\ + + """); Log.Information("Yi框架-Abp.vNext,启动!"); var builder = WebApplication.CreateBuilder(args); From a7a794c7094c0b27cd7235a7c68efe24df3754d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= <454313500@qq.com> Date: Thu, 7 Mar 2024 11:32:49 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E4=B8=8E=E6=95=88=E9=AA=8C=E6=8B=BC=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Extensions/HttpContextExtensions.cs | 2 +- .../Services/Forum/ArticleService.cs | 2 +- .../Services/Forum/DiscussService.cs | 4 ++-- .../Managers/IntegralManager.cs | 4 ++-- .../Services/AccountService.cs | 14 +++++++------- .../Managers/AccountManager.cs | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Core/Extensions/HttpContextExtensions.cs b/Yi.Abp.Net8/framework/Yi.Framework.Core/Extensions/HttpContextExtensions.cs index e83cdf8c..d84b475a 100644 --- a/Yi.Abp.Net8/framework/Yi.Framework.Core/Extensions/HttpContextExtensions.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.Core/Extensions/HttpContextExtensions.cs @@ -75,7 +75,7 @@ namespace Yi.Framework.Core.Extensions result = result.Replace("::ffff:", "127.0.0.1"); - //Ip规则效验 + //Ip规则校验 var regResult = Regex.IsMatch(result, @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$"); result = regResult ? result : "127.0.0.1"; diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/ArticleService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/ArticleService.cs index 34be565a..d46a0681 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/ArticleService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/ArticleService.cs @@ -178,7 +178,7 @@ namespace Yi.Framework.Bbs.Application.Services.Forum /// - /// 效验创建权限,userId为主题创建者 + /// 校验创建权限,userId为主题创建者 /// /// /// diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/DiscussService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/DiscussService.cs index 3dfac9d8..e2717d93 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/DiscussService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/DiscussService.cs @@ -27,7 +27,7 @@ using Yi.Framework.SqlSugarCore.Abstractions; namespace Yi.Framework.Bbs.Application.Services.Forum { /// - /// Discuss应用服务实现,用于参数效验、领域服务业务组合、日志记录、事务处理、账户信息 + /// Discuss应用服务实现,用于参数校验、领域服务业务组合、日志记录、事务处理、账户信息 /// public class DiscussService : YiCrudAppService, IDiscussService @@ -221,7 +221,7 @@ namespace Yi.Framework.Bbs.Application.Services.Forum } /// - /// 效验主题查询权限 + /// 校验主题查询权限 /// /// /// diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Managers/IntegralManager.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Managers/IntegralManager.cs index c209bc58..519f2a92 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Managers/IntegralManager.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/Managers/IntegralManager.cs @@ -43,7 +43,7 @@ namespace Yi.Framework.Bbs.Domain.Managers var sigInLast = await _signInRepository._DbQueryable.Where(x => x.CreatorId == userId).OrderByDescending(x => x.CreationTime).FirstAsync(); - //verify 效验是否允许签到了 + //verify 校验是否允许签到了 if (sigInLast is not null) { VerifySignInTime(sigInLast.CreationTime); @@ -65,7 +65,7 @@ namespace Yi.Framework.Bbs.Domain.Managers } /// - /// 效验签到时间 + /// 校验签到时间 /// /// /// diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs index 1f10b92c..c2344166 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs @@ -64,14 +64,14 @@ namespace Yi.Framework.Rbac.Application.Services private IAccountManager _accountManager; private ISqlSugarRepository _menuRepository; /// - /// 效验图片登录验证码,无需和账号绑定 + /// 校验图片登录验证码,无需和账号绑定 /// [AllowAnonymous] private void ValidationImageCaptcha(LoginInputVo input) { if (_rbacOptions.EnableCaptcha) { - //登录不想要验证码 ,可不效验 + //登录不想要验证码 ,可不校验 if (!_captcha.Validate(input.Uuid, input.Code)) { throw new UserFriendlyException("验证码错误"); @@ -94,11 +94,11 @@ namespace Yi.Framework.Rbac.Application.Services throw new UserFriendlyException("请输入合理数据!"); } - //效验验证码 + //校验验证码 ValidationImageCaptcha(input); UserEntity user = new(); - //效验 + //校验 await _accountManager.LoginValidationAsync(input.UserName, input.Password, x => user = x); //获取token @@ -186,7 +186,7 @@ namespace Yi.Framework.Rbac.Application.Services } /// - /// 效验电话验证码,需要与电话号码绑定 + /// 校验电话验证码,需要与电话号码绑定 /// private async Task ValidationPhoneCaptchaAsync(RegisterDto input) { @@ -240,10 +240,10 @@ namespace Yi.Framework.Rbac.Application.Services throw new UserFriendlyException("密码需大于等于6位!"); } - //效验用户名 + //校验用户名 ValidateUserName(input); - //效验验证码,根据电话号码获取 value,比对验证码已经uuid + //校验验证码,根据电话号码获取 value,比对验证码已经uuid await ValidationPhoneCaptchaAsync(input); diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/AccountManager.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/AccountManager.cs index dfe4ba03..57f3d619 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/AccountManager.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Managers/AccountManager.cs @@ -139,7 +139,7 @@ namespace Yi.Framework.Rbac.Domain.Managers } /// - /// 登录效验 + /// 登录校验 /// /// /// @@ -176,7 +176,7 @@ namespace Yi.Framework.Rbac.Domain.Managers { userAction.Invoke(user); } - //这里为了兼容解决数据库开启了大小写不敏感问题,还要将用户名进行二次效验 + //这里为了兼容解决数据库开启了大小写不敏感问题,还要将用户名进行二次校验 if (user != null&&user.UserName==userName) { return true; From 65f04450017ddae70f86e3ed116ce7696832c50c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= <454313500@qq.com> Date: Thu, 7 Mar 2024 11:44:27 +0800 Subject: [PATCH 4/4] =?UTF-8?q?stlye:=20=E6=B7=BB=E5=8A=A0=E5=A4=87?= =?UTF-8?q?=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/AccessLogService.cs | 5 +++++ .../Services/Forum/AgreeService.cs | 1 + .../Services/Forum/CommentService.cs | 1 + .../Services/Integral/IntegralService.cs | 1 + .../Services/Integral/LuckyService.cs | 1 + .../Yi.Framework.Rbac.Application/Services/FileService.cs | 1 + 6 files changed, 10 insertions(+) diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AccessLogService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AccessLogService.cs index 2f1c387e..84d51ab4 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AccessLogService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/AccessLogService.cs @@ -90,6 +90,11 @@ namespace Yi.Framework.Bbs.Application.Services return WeekTimeHandler(lastSeven.ToArray()); } + /// + /// Todo: 可放入领域层 + /// + /// + /// private AccessLogDto[] WeekTimeHandler(AccessLogEntity[] data) { data = data.Where(x => x.CreationTime >= GetWeekFirst()).OrderByDescending(x => x.CreationTime).DistinctBy(x => x.CreationTime.DayOfWeek).ToArray(); diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/AgreeService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/AgreeService.cs index 2350f2d4..5e1d076e 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/AgreeService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/AgreeService.cs @@ -26,6 +26,7 @@ namespace Yi.Framework.Bbs.Application.Services.Forum /// /// 点赞,返回true为点赞+1,返回false为点赞-1 + /// Todo: 可放入领域层 /// /// [UnitOfWork] diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/CommentService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/CommentService.cs index cdcae5e9..43793995 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/CommentService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/CommentService.cs @@ -44,6 +44,7 @@ namespace Yi.Framework.Bbs.Application.Services.Forum private IDiscussService _discussService { get; set; } /// /// 获取改主题下的评论,结构为二维列表,该查询无分页 + /// Todo: 可放入领域层 /// /// /// diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Integral/IntegralService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Integral/IntegralService.cs index 10855742..7d192f8b 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Integral/IntegralService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Integral/IntegralService.cs @@ -41,6 +41,7 @@ namespace Yi.Framework.Bbs.Application.Services.Integral /// /// 获取本月签到记录 + /// Todo: 可放入领域层 /// /// [Authorize] diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Integral/LuckyService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Integral/LuckyService.cs index 9add8bf3..9a2631c9 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Integral/LuckyService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Integral/LuckyService.cs @@ -16,6 +16,7 @@ namespace Yi.Framework.Bbs.Application.Services.Integral /// /// 大转盘 + /// Todo: 可放入领域层 /// /// [Authorize] diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/FileService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/FileService.cs index 20a5c211..56487a81 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/FileService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/FileService.cs @@ -71,6 +71,7 @@ namespace Yi.Framework.Rbac.Application.Services /// /// 上传文件 + /// Todo: 可放入领域层 /// /// public async Task> Post([FromForm] IFormFileCollection file)