fix: 修复校验与效验拼写
This commit is contained in:
@@ -178,7 +178,7 @@ namespace Yi.Framework.Bbs.Application.Services.Forum
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 效验创建权限,userId为主题创建者
|
||||
/// 校验创建权限,userId为主题创建者
|
||||
/// </summary>
|
||||
/// <param name="disucssId"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@@ -27,7 +27,7 @@ using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
namespace Yi.Framework.Bbs.Application.Services.Forum
|
||||
{
|
||||
/// <summary>
|
||||
/// Discuss应用服务实现,用于参数效验、领域服务业务组合、日志记录、事务处理、账户信息
|
||||
/// Discuss应用服务实现,用于参数校验、领域服务业务组合、日志记录、事务处理、账户信息
|
||||
/// </summary>
|
||||
public class DiscussService : YiCrudAppService<DiscussEntity, DiscussGetOutputDto, DiscussGetListOutputDto, Guid, DiscussGetListInputVo, DiscussCreateInputVo, DiscussUpdateInputVo>,
|
||||
IDiscussService
|
||||
@@ -221,7 +221,7 @@ namespace Yi.Framework.Bbs.Application.Services.Forum
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 效验主题查询权限
|
||||
/// 校验主题查询权限
|
||||
/// </summary>
|
||||
/// <param name="discussId"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 效验签到时间
|
||||
/// 校验签到时间
|
||||
/// </summary>
|
||||
/// <param name="dataTime"></param>
|
||||
/// <exception cref="UserFriendlyException"></exception>
|
||||
|
||||
@@ -64,14 +64,14 @@ namespace Yi.Framework.Rbac.Application.Services
|
||||
private IAccountManager _accountManager;
|
||||
private ISqlSugarRepository<MenuEntity> _menuRepository;
|
||||
/// <summary>
|
||||
/// 效验图片登录验证码,无需和账号绑定
|
||||
/// 校验图片登录验证码,无需和账号绑定
|
||||
/// </summary>
|
||||
[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
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 效验电话验证码,需要与电话号码绑定
|
||||
/// 校验电话验证码,需要与电话号码绑定
|
||||
/// </summary>
|
||||
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);
|
||||
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace Yi.Framework.Rbac.Domain.Managers
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 登录效验
|
||||
/// 登录校验
|
||||
/// </summary>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="password"></param>
|
||||
@@ -176,7 +176,7 @@ namespace Yi.Framework.Rbac.Domain.Managers
|
||||
{
|
||||
userAction.Invoke(user);
|
||||
}
|
||||
//这里为了兼容解决数据库开启了大小写不敏感问题,还要将用户名进行二次效验
|
||||
//这里为了兼容解决数据库开启了大小写不敏感问题,还要将用户名进行二次校验
|
||||
if (user != null&&user.UserName==userName)
|
||||
{
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user