yonge 3 lat temu
rodzic
commit
1dc50d7706

+ 2 - 0
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/handler/BaseAuthenticationSuccessEventHandler.java

@@ -102,6 +102,7 @@ public class BaseAuthenticationSuccessEventHandler extends SavedRequestAwareAuth
 			userLogin.setLastLoginIp(request.getRemoteAddr());
 			userLogin.setUserId(sysUser.getId());
 			userLogin.setLoginCount(1);
+			userLogin.setTenantId(sysUser.getTenantId());
 			sysUserLoginService.insert(setUserLogin(userLogin,date));
 		}else {
 			userLogin.setLastLoginIp(request.getRemoteAddr());
@@ -113,6 +114,7 @@ public class BaseAuthenticationSuccessEventHandler extends SavedRequestAwareAuth
 		sysUserLoginLog.setLoginTime(date);
 		sysUserLoginLog.setLoginIp(request.getRemoteAddr());
 		sysUserLoginLog.setUserId(sysUser.getId());
+		sysUserLoginLog.setTenantId(sysUser.getTenantId());
 		sysUserLoginLogService.insert(sysUserLoginLog);
 		
 		try {