Program修改为新版本写法
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-12-05 17:48:38 +08:00
parent bcc9e1c761
commit edbcabace6
9 changed files with 298 additions and 268 deletions
@@ -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)
{