|
@@ -21,6 +21,7 @@ import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
import org.apache.mybatis.jpa.persistence.JpaPageResults;
|
|
|
import org.maxkey.entity.HistoryLogin;
|
|
|
+import org.maxkey.entity.UserInfo;
|
|
|
import org.maxkey.persistence.service.HistoryLoginService;
|
|
|
import org.maxkey.util.DateUtils;
|
|
|
import org.maxkey.web.WebContext;
|
|
@@ -65,7 +66,12 @@ public class HistoryLoginController {
|
|
|
@ResponseBody
|
|
|
public JpaPageResults<HistoryLogin> logAuthsGrid(@ModelAttribute("historyLogin") HistoryLogin historyLogin) {
|
|
|
_logger.debug("history/login/grid/ logsGrid() " + historyLogin);
|
|
|
- historyLogin.setUserId(WebContext.getUserInfo().getId());
|
|
|
+ UserInfo userInfo = WebContext.getUserInfo();
|
|
|
+ if(userInfo.getUsername().equalsIgnoreCase("admin")){
|
|
|
+
|
|
|
+ }else{
|
|
|
+ historyLogin.setUserId(WebContext.getUserInfo().getId());
|
|
|
+ }
|
|
|
return historyLoginService.queryPageResults(historyLogin);
|
|
|
}
|
|
|
|