x
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-02-14 17:30:21 +08:00
3 changed files with 8 additions and 22 deletions
@@ -56,7 +56,7 @@ namespace IRaCIS.Core.Application.ViewModel
public DateTime? EndDate { get; set; }
public UserTypeEnum? LoginUserTypeEnum { get; set; }
public string? LoginUserType { get; set; }
public Guid? UserTypeId { get; set; }
@@ -37,8 +37,7 @@ namespace IRaCIS.Core.Application.Service
IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig,
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
IRepository<IdentityUser> _identityUserRepository,
IRepository<Doctor> _doctorRepository,
IRepository<Doctor> _doctorRepository,
ISearcher _searcher, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, IUserService
{
@@ -942,10 +941,12 @@ namespace IRaCIS.Core.Application.Service
{
DateTime? trialCreateTime = inQuery.TrialId != null ? _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.CreateTime).FirstOrDefault() : null;
var userLogQueryable =
_userLogRepository.AsQueryable().IgnoreQueryFilters()
.WhereIf(inQuery.IdentityUserId != null, t => t.ActionIdentityUserId == inQuery.IdentityUserId)
.WhereIf(inQuery.TargetIdentityUserId != null, t => t.TargetIdentityUserId == inQuery.IdentityUserId)
.WhereIf(inQuery.IdentityUserId != null, t => t.ActionIdentityUserId == inQuery.IdentityUserId)
.WhereIf(inQuery.TargetIdentityUserId != null, t => t.TargetIdentityUserId == inQuery.TargetIdentityUserId)
.WhereIf(inQuery.TrialId != null, t => t.ActionIdentityUser.UserTrialList.Any(c => c.TrialId == inQuery.TrialId) || t.TargetIdentityUser.UserTrialList.Any(c => c.TrialId == inQuery.TrialId))
.WhereIf(trialCreateTime != null, t => t.CreateTime >= trialCreateTime)
.WhereIf(inQuery.OptType != null, t => t.OptType == inQuery.OptType)
@@ -955,7 +956,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserName), t => t.ActionUserName.Contains(inQuery.LoginUserName!))
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginFaildName), t => t.ActionUserName.Contains(inQuery.LoginFaildName!))
.WhereIf(!string.IsNullOrEmpty(inQuery.IP), t => t.IP.Contains(inQuery.IP!))
.WhereIf(inQuery.LoginUserTypeEnum != null, t => t.CreateUserRole.UserTypeEnum == inQuery.LoginUserTypeEnum)
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserType), t => t.ActionUserType == inQuery.LoginUserType)
.WhereIf(inQuery.UserTypeId != null, t => t.CreateUserRole.UserTypeId == inQuery.UserTypeId)
.ProjectTo<UserLogView>(_mapper.ConfigurationProvider);