From b8de11dfbcb715473f98f2a27c704694599cbe3e Mon Sep 17 00:00:00 2001 From: MaxKey Date: Thu, 18 Jul 2024 22:31:07 +0800 Subject: [PATCH] Update HistorySignOnAppInterceptor.java --- .../maxkey/web/interceptor/HistorySignOnAppInterceptor.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/interceptor/HistorySignOnAppInterceptor.java b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/interceptor/HistorySignOnAppInterceptor.java index 644dec61a..5bf02b6f1 100644 --- a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/interceptor/HistorySignOnAppInterceptor.java +++ b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/interceptor/HistorySignOnAppInterceptor.java @@ -17,6 +17,8 @@ package org.dromara.maxkey.web.interceptor; +import java.util.Date; + import org.dromara.maxkey.authn.SignPrincipal; import org.dromara.maxkey.authn.web.AuthorizationUtils; import org.dromara.maxkey.entity.HistoryLoginApps; @@ -73,6 +75,7 @@ public class HistorySignOnAppInterceptor implements AsyncHandlerInterceptor { historyLoginApps.setUsername(userInfo.getUsername()); historyLoginApps.setDisplayName(userInfo.getDisplayName()); historyLoginApps.setInstId(userInfo.getInstId()); + historyLoginApps.setLoginTime(new Date()); historyLoginAppsService.insert(historyLoginApps); WebContext.removeAttribute(WebConstants.CURRENT_SINGLESIGNON_URI); WebContext.removeAttribute(WebConstants.SINGLE_SIGN_ON_APP_ID);