mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-24 07:02:51 +08:00
fix: 🐛 低版本jetbrains.resharper.globaltools搞乱了代码 (#97)
This commit is contained in:
parent
a37acc4b55
commit
c117ddfe7a
@ -7,24 +7,6 @@
|
||||
"commands": [
|
||||
"t4"
|
||||
]
|
||||
},
|
||||
"dotnet-script": {
|
||||
"version": "1.5.0",
|
||||
"commands": [
|
||||
"dotnet-script"
|
||||
]
|
||||
},
|
||||
"jetbrains.resharper.globaltools": {
|
||||
"version": "2023.3.3",
|
||||
"commands": [
|
||||
"jb"
|
||||
]
|
||||
},
|
||||
"dnt": {
|
||||
"version": "1.9.0",
|
||||
"commands": [
|
||||
"dnt"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@ public sealed class UserIdAttribute : ValidationAttribute
|
||||
var req = new QueryReq<QueryUserReq> { Filter = new QueryUserReq { Id = (long)value! } };
|
||||
|
||||
var method = service.GetType().GetMethod("ExistAsync");
|
||||
var exist = (Task<bool>)method!.Invoke(service, [req])!.ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
var exist = ((Task<bool>)method!.Invoke(service, [req]))!.ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
return !exist ? new ValidationResult(Ln.用户编号不存在) : ValidationResult.Success;
|
||||
}
|
||||
}
|
@ -12,7 +12,7 @@ namespace NetAdmin.Infrastructure.Utils;
|
||||
/// </summary>
|
||||
public static class CaptchaImageHelper
|
||||
{
|
||||
private static readonly int[] _randRange =
|
||||
private static readonly int[] _randRange = [70, 100];
|
||||
|
||||
/// <summary>
|
||||
/// 创建一个缺口滑块验证码图片
|
||||
@ -182,6 +182,4 @@ public static class CaptchaImageHelper
|
||||
{
|
||||
return (endNum > startNum ? new[] { 0, endNum - startNum }.Rand() : 0) + startNum;
|
||||
}
|
||||
|
||||
[70, 100];
|
||||
}
|
@ -14,7 +14,7 @@ namespace NetAdmin.SysComponent.Application.Services.Sys;
|
||||
public sealed class VerifyCodeService(DefaultRepository<Sys_VerifyCode> rpo, IEventPublisher eventPublisher) //
|
||||
: RepositoryService<Sys_VerifyCode, IVerifyCodeService>(rpo), IVerifyCodeService
|
||||
{
|
||||
private static readonly int[] _randRange =
|
||||
private static readonly int[] _randRange = [0, 10000];
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<int> BulkDeleteAsync(BulkReq<DelReq> req)
|
||||
@ -163,8 +163,6 @@ public sealed class VerifyCodeService(DefaultRepository<Sys_VerifyCode> rpo, IEv
|
||||
: await GetAsync(new QueryVerifyCodeReq { Id = req.Id }).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[0, 10000];
|
||||
|
||||
private Task<Sys_VerifyCode> GetLastSentAsync(string destDevice)
|
||||
{
|
||||
return QueryInternal(new QueryReq<QueryVerifyCodeReq> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user