Compare commits

..

No commits in common. "d35bdb6899fa1106e92b7c994647b7bbad2cfe5f" and "e1e7abb65afaf8d14140baeab0e388ef0eb2839e" have entirely different histories.

1 changed files with 2 additions and 11 deletions

View File

@ -996,20 +996,11 @@ namespace IRaCIS.Core.Application.Service
loginUser.NeedChangePassWord = true; loginUser.NeedChangePassWord = true;
} }
List<UserOptType> userOptTypes = new List<UserOptType>() { if (existUserLoginInfo.LastLoginIP != string.Empty)
UserOptType.Login,
UserOptType.AccountOrPasswordError,
UserOptType.LoginLockedAccount
};
var lastLoginIPRegion = await _userLogRepository.Where(t => t.ActionIdentityUserId == existUserLoginInfo.Id && userOptTypes.Contains(t.OptType))
.OrderByDescending(t => t.CreateTime).Select(t => t.IPRegion).FirstOrDefaultAsync();
if (lastLoginIPRegion != string.Empty)
{ {
// 与上一次区域不一致 // 与上一次区域不一致
//if (SplitAndConcatenate(existUserLoginInfo.LastLoginIP) != SplitAndConcatenate(iPRegion)) //if (SplitAndConcatenate(existUserLoginInfo.LastLoginIP) != SplitAndConcatenate(iPRegion))
if (lastLoginIPRegion != iPRegion) if (existUserLoginInfo.LastLoginIP != iPRegion)
{ {
isLoginUncommonly = true; isLoginUncommonly = true;