@@ -12,6 +12,7 @@ using Microsoft.Identity.Client;
|
||||
using static IRaCIS.Core.Domain.Share.StaticData;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using Medallion.Threading;
|
||||
using EasyCaching.Core;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
@@ -26,7 +27,7 @@ namespace IRaCIS.Application.Services
|
||||
private readonly IRepository<UserLog> _userLogRepository;
|
||||
|
||||
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||
private readonly IMemoryCache _cache;
|
||||
private readonly IEasyCachingProvider _cache;
|
||||
|
||||
private readonly IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig;
|
||||
|
||||
@@ -36,7 +37,7 @@ namespace IRaCIS.Application.Services
|
||||
IMailVerificationService mailVerificationService,
|
||||
IRepository<VerificationCode> verificationCodeRepository,
|
||||
IRepository<Doctor> doctorRepository,
|
||||
IMemoryCache cache,
|
||||
IEasyCachingProvider cache,
|
||||
IRepository<TrialUser> userTrialRepository,
|
||||
IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig,
|
||||
IRepository<UserLog> userLogRepository
|
||||
@@ -631,7 +632,7 @@ namespace IRaCIS.Application.Services
|
||||
string cacheKey = $"{cachePrefix}{userName}";
|
||||
|
||||
// 从缓存中获取登录失败次数
|
||||
int? failCount = _cache.Get<int?>(cacheKey);
|
||||
int? failCount = _cache.Get<int?>(cacheKey).Value;
|
||||
|
||||
if (failCount == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user