Quellcode durchsuchen

日期类型调整为date

MaxKey vor 1 Jahr
Ursprung
Commit
ce09413c79
37 geänderte Dateien mit 425 neuen und 355 gelöschten Zeilen
  1. 1 1
      maxkey-authentications/maxkey-authentication-core/src/main/java/org/dromara/maxkey/authn/session/SessionManagerFactory.java
  2. 1 1
      maxkey-authentications/maxkey-authentication-provider/src/main/java/org/dromara/maxkey/authn/realm/AbstractAuthenticationRealm.java
  3. 2 2
      maxkey-authentications/maxkey-authentication-social/src/main/java/org/dromara/maxkey/authn/support/socialsignon/service/JdbcSocialsAssociateService.java
  4. 1 1
      maxkey-core/src/main/java/org/dromara/maxkey/entity/Accounts.java
  5. 18 17
      maxkey-core/src/main/java/org/dromara/maxkey/entity/AccountsStrategy.java
  6. 5 5
      maxkey-core/src/main/java/org/dromara/maxkey/entity/ChangePassword.java
  7. 14 11
      maxkey-core/src/main/java/org/dromara/maxkey/entity/Connectors.java
  8. 13 12
      maxkey-core/src/main/java/org/dromara/maxkey/entity/EmailSenders.java
  9. 5 3
      maxkey-core/src/main/java/org/dromara/maxkey/entity/FileUpload.java
  10. 19 17
      maxkey-core/src/main/java/org/dromara/maxkey/entity/Groups.java
  11. 4 3
      maxkey-core/src/main/java/org/dromara/maxkey/entity/HistoryConnector.java
  12. 7 6
      maxkey-core/src/main/java/org/dromara/maxkey/entity/HistoryLogin.java
  13. 4 3
      maxkey-core/src/main/java/org/dromara/maxkey/entity/HistoryLoginApps.java
  14. 8 7
      maxkey-core/src/main/java/org/dromara/maxkey/entity/HistorySynchronizer.java
  15. 4 3
      maxkey-core/src/main/java/org/dromara/maxkey/entity/HistorySystemLogs.java
  16. 13 11
      maxkey-core/src/main/java/org/dromara/maxkey/entity/LdapContext.java
  17. 14 12
      maxkey-core/src/main/java/org/dromara/maxkey/entity/Organizations.java
  18. 13 12
      maxkey-core/src/main/java/org/dromara/maxkey/entity/Register.java
  19. 18 17
      maxkey-core/src/main/java/org/dromara/maxkey/entity/Resources.java
  20. 19 17
      maxkey-core/src/main/java/org/dromara/maxkey/entity/Roles.java
  21. 14 12
      maxkey-core/src/main/java/org/dromara/maxkey/entity/SmsProvider.java
  22. 16 15
      maxkey-core/src/main/java/org/dromara/maxkey/entity/SocialsAssociate.java
  23. 18 17
      maxkey-core/src/main/java/org/dromara/maxkey/entity/SocialsProvider.java
  24. 14 12
      maxkey-core/src/main/java/org/dromara/maxkey/entity/Synchronizers.java
  25. 104 68
      maxkey-core/src/main/java/org/dromara/maxkey/entity/UserInfo.java
  26. 39 17
      maxkey-core/src/main/java/org/dromara/maxkey/entity/apps/Apps.java
  27. 7 7
      maxkey-core/src/main/java/org/dromara/maxkey/persistence/repository/LoginRepository.java
  28. 7 17
      maxkey-core/src/main/java/org/dromara/maxkey/persistence/repository/PasswordPolicyValidator.java
  29. 4 3
      maxkey-persistence/src/main/java/org/dromara/maxkey/persistence/service/UserInfoService.java
  30. 1 1
      maxkey-persistence/src/main/resources/org/dromara/maxkey/persistence/mapper/xml/mysql/HistoryLoginAppsMapper.xml
  31. 4 4
      maxkey-persistence/src/main/resources/org/dromara/maxkey/persistence/mapper/xml/mysql/HistoryLoginMapper.xml
  32. 1 1
      maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/dromara/maxkey/authz/oidc/idtoken/OIDCIdTokenEnhancer.java
  33. 0 1
      maxkey-synchronizers/maxkey-synchronizer-activedirectory/src/main/java/org/dromara/maxkey/synchronizer/activedirectory/ActiveDirectoryOrganizationService.java
  34. 4 6
      maxkey-web-apis/maxkey-web-api-scim/src/main/java/org/dromara/maxkey/web/apis/identity/scim/ScimGroupController.java
  35. 4 6
      maxkey-web-apis/maxkey-web-api-scim/src/main/java/org/dromara/maxkey/web/apis/identity/scim/ScimOrganizationController.java
  36. 4 6
      maxkey-web-apis/maxkey-web-api-scim/src/main/java/org/dromara/maxkey/web/apis/identity/scim/ScimUserController.java
  37. 1 1
      maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/web/idm/contorller/UserInfoController.java

+ 1 - 1
maxkey-authentications/maxkey-authentication-core/src/main/java/org/dromara/maxkey/authn/session/SessionManagerFactory.java

@@ -188,7 +188,7 @@ public class SessionManagerFactory implements SessionManager{
 			history.setUserId(rs.getString(3));
 			history.setUsername(rs.getString(4));
 			history.setDisplayName(rs.getString(5));
-			history.setLoginTime(rs.getString(6));
+			history.setLoginTime(rs.getTimestamp(6));
 			return history;
 		}
 	}

+ 1 - 1
maxkey-authentications/maxkey-authentication-provider/src/main/java/org/dromara/maxkey/authn/realm/AbstractAuthenticationRealm.java

@@ -134,7 +134,7 @@ public abstract class AbstractAuthenticationRealm {
         
         _logger.debug("user session id is {} . ",historyLogin.getSessionId());
         
-        userInfo.setLastLoginTime(DateUtils.formatDateTime(new Date()));
+        userInfo.setLastLoginTime(new Date());
         userInfo.setLastLoginIp(WebContext.getRequestIpAddress());
         
         Browser browser = resolveBrowser();

+ 2 - 2
maxkey-authentications/maxkey-authentication-social/src/main/java/org/dromara/maxkey/authn/support/socialsignon/service/JdbcSocialsAssociateService.java

@@ -138,8 +138,8 @@ public class JdbcSocialsAssociateService   implements SocialsAssociateService{
 			socialsAssociate.setAccessToken(rs.getString(6));
 			socialsAssociate.setSocialUserInfo(rs.getString(7));
 			socialsAssociate.setExAttribute(rs.getString(8));
-			socialsAssociate.setCreatedDate(rs.getString(9));
-			socialsAssociate.setUpdatedDate(rs.getString(10));
+			socialsAssociate.setCreatedDate(rs.getTimestamp(9));
+			socialsAssociate.setUpdatedDate(rs.getTimestamp(10));
 			socialsAssociate.setInstId(rs.getString(11));
 			return socialsAssociate;
 		}

+ 1 - 1
maxkey-core/src/main/java/org/dromara/maxkey/entity/Accounts.java

@@ -76,7 +76,7 @@ public class Accounts extends JpaEntity implements Serializable {
     UserInfo userInfo;
     
     @JsonIgnore
-    private HashMap<String,OrganizationsCast> orgCast =new HashMap<String,OrganizationsCast>();
+    private HashMap<String,OrganizationsCast> orgCast =new HashMap<>();
 
     public Accounts() {
         super();

+ 18 - 17
maxkey-core/src/main/java/org/dromara/maxkey/entity/AccountsStrategy.java

@@ -19,6 +19,7 @@ package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
 import java.util.Base64;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -66,11 +67,11 @@ public class AccountsStrategy extends JpaEntity implements Serializable {
     @Column
     String createdBy;
     @Column
-    String createdDate;
+    Date createdDate;
     @Column
     String modifiedBy;
     @Column
-    String modifiedDate;
+    Date modifiedDate;
     
     @Column
     private String instId;
@@ -121,14 +122,6 @@ public class AccountsStrategy extends JpaEntity implements Serializable {
         this.createdBy = createdBy;
     }
 
-    public String getCreatedDate() {
-        return createdDate;
-    }
-
-    public void setCreatedDate(String createdDate) {
-        this.createdDate = createdDate;
-    }
-
     public String getModifiedBy() {
         return modifiedBy;
     }
@@ -137,15 +130,23 @@ public class AccountsStrategy extends JpaEntity implements Serializable {
         this.modifiedBy = modifiedBy;
     }
 
-    public String getModifiedDate() {
-        return modifiedDate;
-    }
+    public Date getCreatedDate() {
+		return createdDate;
+	}
 
-    public void setModifiedDate(String modifiedDate) {
-        this.modifiedDate = modifiedDate;
-    }
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public Date getModifiedDate() {
+		return modifiedDate;
+	}
+
+	public void setModifiedDate(Date modifiedDate) {
+		this.modifiedDate = modifiedDate;
+	}
 
-    public String getFilters() {
+	public String getFilters() {
         return filters;
     }
 

+ 5 - 5
maxkey-core/src/main/java/org/dromara/maxkey/entity/ChangePassword.java

@@ -17,6 +17,8 @@
 
 package org.dromara.maxkey.entity;
 
+import java.util.Date;
+
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
 public class ChangePassword extends JpaEntity{
@@ -40,7 +42,7 @@ public class ChangePassword extends JpaEntity{
 	private String decipherable;
 	private String instId;
 	private int passwordSetType;
-	private String passwordLastSetTime;
+	private Date passwordLastSetTime;
 	
 	/**
 	 * 
@@ -243,16 +245,14 @@ public class ChangePassword extends JpaEntity{
 	}
 
 
-	public String getPasswordLastSetTime() {
+	public Date getPasswordLastSetTime() {
 		return passwordLastSetTime;
 	}
 
-
-	public void setPasswordLastSetTime(String passwordLastSetTime) {
+	public void setPasswordLastSetTime(Date passwordLastSetTime) {
 		this.passwordLastSetTime = passwordLastSetTime;
 	}
 
-
 	@Override
     public String toString() {
         StringBuilder builder = new StringBuilder();

+ 14 - 11
maxkey-core/src/main/java/org/dromara/maxkey/entity/Connectors.java

@@ -17,6 +17,8 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
+
 import org.dromara.maxkey.pretty.impl.JsonPretty;
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -54,11 +56,11 @@ public class Connectors extends JpaEntity implements Serializable {
 	@Column
 	String createdBy;
 	@Column
-	String createdDate;
+	Date createdDate;
 	@Column
 	String modifiedBy;
 	@Column
-	String modifiedDate;
+	Date modifiedDate;
 	@Column
 	String status;
 
@@ -150,13 +152,6 @@ public class Connectors extends JpaEntity implements Serializable {
 		this.createdBy = createdBy;
 	}
 
-	public String getCreatedDate() {
-		return createdDate;
-	}
-
-	public void setCreatedDate(String createdDate) {
-		this.createdDate = createdDate;
-	}
 
 	public String getModifiedBy() {
 		return modifiedBy;
@@ -166,11 +161,19 @@ public class Connectors extends JpaEntity implements Serializable {
 		this.modifiedBy = modifiedBy;
 	}
 
-	public String getModifiedDate() {
+	public Date getCreatedDate() {
+		return createdDate;
+	}
+
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public Date getModifiedDate() {
 		return modifiedDate;
 	}
 
-	public void setModifiedDate(String modifiedDate) {
+	public void setModifiedDate(Date modifiedDate) {
 		this.modifiedDate = modifiedDate;
 	}
 

+ 13 - 12
maxkey-core/src/main/java/org/dromara/maxkey/entity/EmailSenders.java

@@ -20,6 +20,7 @@ package org.dromara.maxkey.entity;
 
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -82,13 +83,13 @@ public class EmailSenders  extends JpaEntity  implements Serializable {
     private String createdBy;
     
     @Column
-    private String createdDate;
+    private Date createdDate;
     
     @Column
     private String modifiedBy;
     
     @Column
-    private String modifiedDate;
+    private Date modifiedDate;
 
 	public EmailSenders() {
 		super();
@@ -207,14 +208,6 @@ public class EmailSenders  extends JpaEntity  implements Serializable {
 		this.createdBy = createdBy;
 	}
 
-	public String getCreatedDate() {
-		return createdDate;
-	}
-
-	public void setCreatedDate(String createdDate) {
-		this.createdDate = createdDate;
-	}
-
 	public String getModifiedBy() {
 		return modifiedBy;
 	}
@@ -223,11 +216,19 @@ public class EmailSenders  extends JpaEntity  implements Serializable {
 		this.modifiedBy = modifiedBy;
 	}
 
-	public String getModifiedDate() {
+	public Date getCreatedDate() {
+		return createdDate;
+	}
+
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public Date getModifiedDate() {
 		return modifiedDate;
 	}
 
-	public void setModifiedDate(String modifiedDate) {
+	public void setModifiedDate(Date modifiedDate) {
 		this.modifiedDate = modifiedDate;
 	}
 

+ 5 - 3
maxkey-core/src/main/java/org/dromara/maxkey/entity/FileUpload.java

@@ -18,6 +18,8 @@
 package org.dromara.maxkey.entity;
 
 
+import java.util.Date;
+
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -57,7 +59,7 @@ public class FileUpload extends JpaEntity {
     @Column
     String createdBy;
     
-    String createdDate;
+    Date createdDate;
 
 	public String getId() {
 		return id;
@@ -115,11 +117,11 @@ public class FileUpload extends JpaEntity {
 		this.createdBy = createdBy;
 	}
 
-	public String getCreatedDate() {
+	public Date getCreatedDate() {
 		return createdDate;
 	}
 
-	public void setCreatedDate(String createdDate) {
+	public void setCreatedDate(Date createdDate) {
 		this.createdDate = createdDate;
 	}
 

+ 19 - 17
maxkey-core/src/main/java/org/dromara/maxkey/entity/Groups.java

@@ -18,6 +18,8 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
+
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
 import jakarta.persistence.Column;
@@ -75,11 +77,11 @@ public class Groups extends JpaEntity implements Serializable {
     @Column
     String createdBy;
     @Column
-    String createdDate;
+    Date createdDate;
     @Column
     String modifiedBy;
     @Column
-    String modifiedDate;
+    Date modifiedDate;
     @Column
     int status;
     
@@ -158,14 +160,6 @@ public class Groups extends JpaEntity implements Serializable {
         this.createdBy = createdBy;
     }
 
-    public String getCreatedDate() {
-        return createdDate;
-    }
-
-    public void setCreatedDate(String createdDate) {
-        this.createdDate = createdDate;
-    }
-
     public String getModifiedBy() {
         return modifiedBy;
     }
@@ -174,15 +168,23 @@ public class Groups extends JpaEntity implements Serializable {
         this.modifiedBy = modifiedBy;
     }
 
-    public String getModifiedDate() {
-        return modifiedDate;
-    }
+    public Date getCreatedDate() {
+		return createdDate;
+	}
 
-    public void setModifiedDate(String modifiedDate) {
-        this.modifiedDate = modifiedDate;
-    }
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public Date getModifiedDate() {
+		return modifiedDate;
+	}
+
+	public void setModifiedDate(Date modifiedDate) {
+		this.modifiedDate = modifiedDate;
+	}
 
-    public int getStatus() {
+	public int getStatus() {
         return status;
     }
 

+ 4 - 3
maxkey-core/src/main/java/org/dromara/maxkey/entity/HistoryConnector.java

@@ -17,6 +17,7 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -65,7 +66,7 @@ public class HistoryConnector extends JpaEntity implements Serializable {
 	@Column
 	String description;
 
-	String syncTime;
+	Date syncTime;
 
 	@Column
 	String result;
@@ -135,11 +136,11 @@ public class HistoryConnector extends JpaEntity implements Serializable {
 		this.description = description;
 	}
 
-	public String getSyncTime() {
+	public Date getSyncTime() {
 		return syncTime;
 	}
 
-	public void setSyncTime(String syncTime) {
+	public void setSyncTime(Date syncTime) {
 		this.syncTime = syncTime;
 	}
 

+ 7 - 6
maxkey-core/src/main/java/org/dromara/maxkey/entity/HistoryLogin.java

@@ -18,6 +18,7 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -80,9 +81,9 @@ public class HistoryLogin  extends JpaEntity  implements Serializable{
 	@Column
 	String loginUrl;
 	@Column
-	String loginTime;
+	Date loginTime;
 	@Column
-	String logoutTime;
+	Date logoutTime;
 	@Column
 	private String instId;
 
@@ -241,19 +242,19 @@ public class HistoryLogin  extends JpaEntity  implements Serializable{
 		this.loginUrl = loginUrl;
 	}
 
-	public String getLoginTime() {
+	public Date getLoginTime() {
 		return loginTime;
 	}
 
-	public void setLoginTime(String loginTime) {
+	public void setLoginTime(Date loginTime) {
 		this.loginTime = loginTime;
 	}
 
-	public String getLogoutTime() {
+	public Date getLogoutTime() {
 		return logoutTime;
 	}
 
-	public void setLogoutTime(String logoutTime) {
+	public void setLogoutTime(Date logoutTime) {
 		this.logoutTime = logoutTime;
 	}
 

+ 4 - 3
maxkey-core/src/main/java/org/dromara/maxkey/entity/HistoryLoginApps.java

@@ -18,6 +18,7 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -53,7 +54,7 @@ public class HistoryLoginApps extends JpaEntity  implements Serializable {
 	@Column
 	private String displayName;
 	@Column
-	private String loginTime;
+	private Date loginTime;
 	@Column
 	private String instId;
 
@@ -135,13 +136,13 @@ public class HistoryLoginApps extends JpaEntity  implements Serializable {
 	/**
 	 * @return the loginTime
 	 */
-	public String getLoginTime() {
+	public Date getLoginTime() {
 		return loginTime;
 	}
 	/**
 	 * @param loginTime the loginTime to set
 	 */
-	public void setLoginTime(String loginTime) {
+	public void setLoginTime(Date loginTime) {
 		this.loginTime = loginTime;
 	}
 

+ 8 - 7
maxkey-core/src/main/java/org/dromara/maxkey/entity/HistorySynchronizer.java

@@ -18,6 +18,7 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -54,7 +55,7 @@ public class HistorySynchronizer  extends JpaEntity  implements Serializable{
     String objectType;
     @Column
     String objectName;
-    String syncTime;
+    Date syncTime;
     @Column
     String result;
 	@Column
@@ -65,7 +66,7 @@ public class HistorySynchronizer  extends JpaEntity  implements Serializable{
     String endDate;
     
     public HistorySynchronizer(String id, String syncId,  String syncName, String objectId,
-			String objectType, String objectName, String syncTime, String result,String instId) {
+			String objectType, String objectName, String result,String instId) {
 		super();
 		this.id = id;
 		this.syncId = syncId;
@@ -73,14 +74,14 @@ public class HistorySynchronizer  extends JpaEntity  implements Serializable{
 		this.objectId = objectId;
 		this.objectType = objectType;
 		this.objectName = objectName;
-		this.syncTime = syncTime;
+		this.syncTime = new Date();
 		this.result = result;
 		this.instId = instId;
 	}
     
     
 	public HistorySynchronizer(String id, String syncId, String sessionId, String syncName, String objectId,
-			String objectType, String objectName, String syncTime, String result, String instId) {
+			String objectType, String objectName, String result, String instId) {
 		super();
 		this.id = id;
 		this.syncId = syncId;
@@ -89,7 +90,7 @@ public class HistorySynchronizer  extends JpaEntity  implements Serializable{
 		this.objectId = objectId;
 		this.objectType = objectType;
 		this.objectName = objectName;
-		this.syncTime = syncTime;
+		this.syncTime = new Date();
 		this.result = result;
 		this.instId = instId;
 	}
@@ -131,10 +132,10 @@ public class HistorySynchronizer  extends JpaEntity  implements Serializable{
     public void setObjectName(String objectName) {
         this.objectName = objectName;
     }
-    public String getSyncTime() {
+    public Date getSyncTime() {
         return syncTime;
     }
-    public void setSyncTime(String syncTime) {
+    public void setSyncTime(Date syncTime) {
         this.syncTime = syncTime;
     }
     public String getResult() {

+ 4 - 3
maxkey-core/src/main/java/org/dromara/maxkey/entity/HistorySystemLogs.java

@@ -18,6 +18,7 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -55,7 +56,7 @@ public class HistorySystemLogs extends JpaEntity implements Serializable {
     @Column
     String displayName;
     @Column
-    String executeTime;
+    Date executeTime;
 	@Column
 	private String instId;
 
@@ -133,11 +134,11 @@ public class HistorySystemLogs extends JpaEntity implements Serializable {
 		this.displayName = displayName;
 	}
 
-	public String getExecuteTime() {
+	public Date getExecuteTime() {
 		return executeTime;
 	}
 
-	public void setExecuteTime(String executeTime) {
+	public void setExecuteTime(Date executeTime) {
 		this.executeTime = executeTime;
 	}
 

+ 13 - 11
maxkey-core/src/main/java/org/dromara/maxkey/entity/LdapContext.java

@@ -18,6 +18,7 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -67,11 +68,11 @@ public class LdapContext extends JpaEntity implements Serializable {
     @Column
     String createdBy;
     @Column
-    String createdDate;
+    Date createdDate;
     @Column
     String modifiedBy;
     @Column
-    String modifiedDate;
+    Date modifiedDate;
     @Column
     int status;
     
@@ -195,13 +196,6 @@ public class LdapContext extends JpaEntity implements Serializable {
 		this.createdBy = createdBy;
 	}
 
-	public String getCreatedDate() {
-		return createdDate;
-	}
-
-	public void setCreatedDate(String createdDate) {
-		this.createdDate = createdDate;
-	}
 
 	public String getModifiedBy() {
 		return modifiedBy;
@@ -211,11 +205,19 @@ public class LdapContext extends JpaEntity implements Serializable {
 		this.modifiedBy = modifiedBy;
 	}
 
-	public String getModifiedDate() {
+	public Date getCreatedDate() {
+		return createdDate;
+	}
+
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public Date getModifiedDate() {
 		return modifiedDate;
 	}
 
-	public void setModifiedDate(String modifiedDate) {
+	public void setModifiedDate(Date modifiedDate) {
 		this.modifiedDate = modifiedDate;
 	}
 

+ 14 - 12
maxkey-core/src/main/java/org/dromara/maxkey/entity/Organizations.java

@@ -18,6 +18,8 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
+
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
 import jakarta.persistence.Column;
@@ -103,11 +105,11 @@ public class Organizations extends JpaEntity implements Serializable {
     @Column
     String createdBy;
     @Column
-    String createdDate;
+    Date createdDate;
     @Column
     String modifiedBy;
     @Column
-    String modifiedDate;
+    Date modifiedDate;
     
 	@Column
 	private String instId;
@@ -374,14 +376,6 @@ public class Organizations extends JpaEntity implements Serializable {
 		this.createdBy = createdBy;
 	}
 
-	public String getCreatedDate() {
-		return createdDate;
-	}
-
-	public void setCreatedDate(String createdDate) {
-		this.createdDate = createdDate;
-	}
-
 	public String getModifiedBy() {
 		return modifiedBy;
 	}
@@ -390,11 +384,19 @@ public class Organizations extends JpaEntity implements Serializable {
 		this.modifiedBy = modifiedBy;
 	}
 
-	public String getModifiedDate() {
+	public Date getCreatedDate() {
+		return createdDate;
+	}
+
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public Date getModifiedDate() {
 		return modifiedDate;
 	}
 
-	public void setModifiedDate(String modifiedDate) {
+	public void setModifiedDate(Date modifiedDate) {
 		this.modifiedDate = modifiedDate;
 	}
 

+ 13 - 12
maxkey-core/src/main/java/org/dromara/maxkey/entity/Register.java

@@ -18,6 +18,7 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -58,11 +59,11 @@ public class Register extends JpaEntity  implements Serializable {
     @Column
     String createdBy;
     @Column
-    String createdDate;
+    Date createdDate;
     @Column
     String modifiedBy;
     @Column
-    String modifiedDate;
+    Date modifiedDate;
     
 	
 	/**
@@ -146,14 +147,6 @@ public class Register extends JpaEntity  implements Serializable {
 		this.createdBy = createdBy;
 	}
 
-	public String getCreatedDate() {
-		return createdDate;
-	}
-
-	public void setCreatedDate(String createdDate) {
-		this.createdDate = createdDate;
-	}
-
 	public String getModifiedBy() {
 		return modifiedBy;
 	}
@@ -161,12 +154,20 @@ public class Register extends JpaEntity  implements Serializable {
 	public void setModifiedBy(String modifiedBy) {
 		this.modifiedBy = modifiedBy;
 	}
+	
+	public Date getCreatedDate() {
+		return createdDate;
+	}
+
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
 
-	public String getModifiedDate() {
+	public Date getModifiedDate() {
 		return modifiedDate;
 	}
 
-	public void setModifiedDate(String modifiedDate) {
+	public void setModifiedDate(Date modifiedDate) {
 		this.modifiedDate = modifiedDate;
 	}
 

+ 18 - 17
maxkey-core/src/main/java/org/dromara/maxkey/entity/Resources.java

@@ -18,6 +18,7 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -65,11 +66,11 @@ public class Resources  extends JpaEntity implements Serializable {
     @Column
     String createdBy;
     @Column
-    String createdDate;
+    Date createdDate;
     @Column
     String modifiedBy;
     @Column
-    String modifiedDate;
+    Date modifiedDate;
 	@Column
 	private String instId;
 
@@ -199,14 +200,6 @@ public class Resources  extends JpaEntity implements Serializable {
         this.createdBy = createdBy;
     }
 
-    public String getCreatedDate() {
-        return createdDate;
-    }
-
-    public void setCreatedDate(String createdDate) {
-        this.createdDate = createdDate;
-    }
-
     public String getModifiedBy() {
         return modifiedBy;
     }
@@ -215,15 +208,23 @@ public class Resources  extends JpaEntity implements Serializable {
         this.modifiedBy = modifiedBy;
     }
 
-    public String getModifiedDate() {
-        return modifiedDate;
-    }
+    public Date getCreatedDate() {
+		return createdDate;
+	}
 
-    public void setModifiedDate(String modifiedDate) {
-        this.modifiedDate = modifiedDate;
-    }
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public Date getModifiedDate() {
+		return modifiedDate;
+	}
+
+	public void setModifiedDate(Date modifiedDate) {
+		this.modifiedDate = modifiedDate;
+	}
 
-    public int getSortIndex() {
+	public int getSortIndex() {
         return sortIndex;
     }
 

+ 19 - 17
maxkey-core/src/main/java/org/dromara/maxkey/entity/Roles.java

@@ -18,6 +18,8 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
+
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
 import jakarta.persistence.Column;
@@ -75,11 +77,11 @@ public class Roles extends JpaEntity implements Serializable {
     @Column
     String createdBy;
     @Column
-    String createdDate;
+    Date createdDate;
     @Column
     String modifiedBy;
     @Column
-    String modifiedDate;
+    Date modifiedDate;
     @Column
     int status;
     
@@ -157,14 +159,6 @@ public class Roles extends JpaEntity implements Serializable {
         this.createdBy = createdBy;
     }
 
-    public String getCreatedDate() {
-        return createdDate;
-    }
-
-    public void setCreatedDate(String createdDate) {
-        this.createdDate = createdDate;
-    }
-
     public String getModifiedBy() {
         return modifiedBy;
     }
@@ -173,15 +167,23 @@ public class Roles extends JpaEntity implements Serializable {
         this.modifiedBy = modifiedBy;
     }
 
-    public String getModifiedDate() {
-        return modifiedDate;
-    }
+    public Date getCreatedDate() {
+		return createdDate;
+	}
 
-    public void setModifiedDate(String modifiedDate) {
-        this.modifiedDate = modifiedDate;
-    }
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public Date getModifiedDate() {
+		return modifiedDate;
+	}
+
+	public void setModifiedDate(Date modifiedDate) {
+		this.modifiedDate = modifiedDate;
+	}
 
-    public int getStatus() {
+	public int getStatus() {
         return status;
     }
 

+ 14 - 12
maxkey-core/src/main/java/org/dromara/maxkey/entity/SmsProvider.java

@@ -18,6 +18,8 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
+
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
 import jakarta.persistence.Column;
@@ -60,11 +62,11 @@ public class SmsProvider extends JpaEntity implements Serializable {
     @Column
     String createdBy;
     @Column
-    String createdDate;
+    Date createdDate;
     @Column
     String modifiedBy;
     @Column
-    String modifiedDate;
+    Date modifiedDate;
     @Column
     int status;
     
@@ -164,14 +166,6 @@ public class SmsProvider extends JpaEntity implements Serializable {
 		this.createdBy = createdBy;
 	}
 
-	public String getCreatedDate() {
-		return createdDate;
-	}
-
-	public void setCreatedDate(String createdDate) {
-		this.createdDate = createdDate;
-	}
-
 	public String getModifiedBy() {
 		return modifiedBy;
 	}
@@ -180,11 +174,19 @@ public class SmsProvider extends JpaEntity implements Serializable {
 		this.modifiedBy = modifiedBy;
 	}
 
-	public String getModifiedDate() {
+	public Date getCreatedDate() {
+		return createdDate;
+	}
+
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public Date getModifiedDate() {
 		return modifiedDate;
 	}
 
-	public void setModifiedDate(String modifiedDate) {
+	public void setModifiedDate(Date modifiedDate) {
 		this.modifiedDate = modifiedDate;
 	}
 

+ 16 - 15
maxkey-core/src/main/java/org/dromara/maxkey/entity/SocialsAssociate.java

@@ -18,6 +18,7 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -59,9 +60,9 @@ public class SocialsAssociate extends JpaEntity  implements Serializable {
 	private String accessToken;
 	private String exAttribute; 
 	@Column
-    private String createdDate;
+    private Date createdDate;
     @Column
-    private String updatedDate;
+    private Date updatedDate;
     @Column
     private String instId;
 	
@@ -137,23 +138,23 @@ public class SocialsAssociate extends JpaEntity  implements Serializable {
 		this.exAttribute = exAttribute;
 	}
 
-	public String getCreatedDate() {
-        return createdDate;
-    }
+    public Date getCreatedDate() {
+		return createdDate;
+	}
 
-    public void setCreatedDate(String createdDate) {
-        this.createdDate = createdDate;
-    }
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
 
-    public String getUpdatedDate() {
-        return updatedDate;
-    }
+	public Date getUpdatedDate() {
+		return updatedDate;
+	}
 
-    public void setUpdatedDate(String updatedDate) {
-        this.updatedDate = updatedDate;
-    }
+	public void setUpdatedDate(Date updatedDate) {
+		this.updatedDate = updatedDate;
+	}
 
-    public String getInstId() {
+	public String getInstId() {
 		return instId;
 	}
 

+ 18 - 17
maxkey-core/src/main/java/org/dromara/maxkey/entity/SocialsProvider.java

@@ -18,6 +18,7 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -67,11 +68,11 @@ public class SocialsProvider extends JpaEntity implements Serializable {
     @Column
     String createdBy;
     @Column
-    String createdDate;
+    Date createdDate;
     @Column
     String modifiedBy;
     @Column
-    String modifiedDate;
+    Date modifiedDate;
     
 	private String redirectUri;
 	
@@ -240,14 +241,6 @@ public class SocialsProvider extends JpaEntity implements Serializable {
         this.createdBy = createdBy;
     }
 
-    public String getCreatedDate() {
-        return createdDate;
-    }
-
-    public void setCreatedDate(String createdDate) {
-        this.createdDate = createdDate;
-    }
-
     public String getModifiedBy() {
         return modifiedBy;
     }
@@ -256,15 +249,23 @@ public class SocialsProvider extends JpaEntity implements Serializable {
         this.modifiedBy = modifiedBy;
     }
 
-    public String getModifiedDate() {
-        return modifiedDate;
-    }
+    public Date getCreatedDate() {
+		return createdDate;
+	}
 
-    public void setModifiedDate(String modifiedDate) {
-        this.modifiedDate = modifiedDate;
-    }
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public Date getModifiedDate() {
+		return modifiedDate;
+	}
+
+	public void setModifiedDate(Date modifiedDate) {
+		this.modifiedDate = modifiedDate;
+	}
 
-    public long getSortIndex() {
+	public long getSortIndex() {
         return sortIndex;
     }
 

+ 14 - 12
maxkey-core/src/main/java/org/dromara/maxkey/entity/Synchronizers.java

@@ -17,6 +17,8 @@
 package org.dromara.maxkey.entity;
 
 import java.io.Serializable;
+import java.util.Date;
+
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
 import jakarta.persistence.Column;
@@ -83,11 +85,11 @@ public class Synchronizers extends JpaEntity implements Serializable {
 	@Column
 	String createdBy;
 	@Column
-	String createdDate;
+	Date createdDate;
 	@Column
 	String modifiedBy;
 	@Column
-	String modifiedDate;
+	Date modifiedDate;
 	@Column
 	String status;
 	@Column
@@ -273,14 +275,6 @@ public class Synchronizers extends JpaEntity implements Serializable {
 		this.createdBy = createdBy;
 	}
 
-	public String getCreatedDate() {
-		return createdDate;
-	}
-
-	public void setCreatedDate(String createdDate) {
-		this.createdDate = createdDate;
-	}
-
 	public String getModifiedBy() {
 		return modifiedBy;
 	}
@@ -289,11 +283,19 @@ public class Synchronizers extends JpaEntity implements Serializable {
 		this.modifiedBy = modifiedBy;
 	}
 
-	public String getModifiedDate() {
+	public Date getCreatedDate() {
+		return createdDate;
+	}
+
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	public Date getModifiedDate() {
 		return modifiedDate;
 	}
 
-	public void setModifiedDate(String modifiedDate) {
+	public void setModifiedDate(Date modifiedDate) {
 		this.modifiedDate = modifiedDate;
 	}
 

+ 104 - 68
maxkey-core/src/main/java/org/dromara/maxkey/entity/UserInfo.java

@@ -20,6 +20,7 @@ package org.dromara.maxkey.entity;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 
 import java.io.Serializable;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 
@@ -149,14 +150,14 @@ public class UserInfo extends JpaEntity  implements Serializable {
     @JsonIgnore
     protected HashMap<String, String> protectedAppsMap;
 
-    protected String passwordLastSetTime;
+    protected Date passwordLastSetTime;
     protected int badPasswordCount;
-    protected String badPasswordTime;
-    protected String unLockTime;
+    protected Date badPasswordTime;
+    protected Date unLockTime;
     protected int isLocked;
-    protected String lastLoginTime;
+    protected Date lastLoginTime;
     protected String lastLoginIp;
-    protected String lastLogoffTime;
+    protected Date lastLogoffTime;
     protected int passwordSetType;
     protected Integer loginCount;
     protected String regionHistory;
@@ -265,11 +266,11 @@ public class UserInfo extends JpaEntity  implements Serializable {
     @Column
     String createdBy;
     @Column
-    String createdDate;
+    Date createdDate;
     @Column
     String modifiedBy;
     @Column
-    String modifiedDate;
+    Date modifiedDate;
     @Column
     int status;
     @Column
@@ -766,13 +767,6 @@ public class UserInfo extends JpaEntity  implements Serializable {
         this.protectedApps = protectedApps;
     }
 
-    public String getPasswordLastSetTime() {
-        return passwordLastSetTime;
-    }
-
-    public void setPasswordLastSetTime(String passwordLastSetTime) {
-        this.passwordLastSetTime = passwordLastSetTime;
-    }
 
     public int getBadPasswordCount() {
         return badPasswordCount;
@@ -782,21 +776,6 @@ public class UserInfo extends JpaEntity  implements Serializable {
         this.badPasswordCount = badPasswordCount;
     }
 
-    public String getBadPasswordTime() {
-        return badPasswordTime;
-    }
-
-    public void setBadPasswordTime(String badPasswordTime) {
-        this.badPasswordTime = badPasswordTime;
-    }
-
-    public String getUnLockTime() {
-        return unLockTime;
-    }
-
-    public void setUnLockTime(String unLockTime) {
-        this.unLockTime = unLockTime;
-    }
 
     public int getIsLocked() {
         return isLocked;
@@ -806,21 +785,7 @@ public class UserInfo extends JpaEntity  implements Serializable {
         this.isLocked = isLocked;
     }
 
-    public String getLastLoginTime() {
-        return lastLoginTime;
-    }
-
-    public void setLastLoginTime(String lastLoginTime) {
-        this.lastLoginTime = lastLoginTime;
-    }
-
-    public String getLastLogoffTime() {
-        return lastLogoffTime;
-    }
 
-    public void setLastLogoffTime(String lastLogoffTime) {
-        this.lastLogoffTime = lastLogoffTime;
-    }
 
     public int getPasswordSetType() {
         return passwordSetType;
@@ -1249,19 +1214,6 @@ public class UserInfo extends JpaEntity  implements Serializable {
         this.createdBy = createdBy;
     }
 
-    /**
-     * @return the createdDate
-     */
-    public String getCreatedDate() {
-        return createdDate;
-    }
-
-    /**
-     * @param createdDate the createdDate to set
-     */
-    public void setCreatedDate(String createdDate) {
-        this.createdDate = createdDate;
-    }
 
     /**
      * @return the modifiedBy
@@ -1278,20 +1230,104 @@ public class UserInfo extends JpaEntity  implements Serializable {
     }
 
     /**
-     * @return the modifiedDate
-     */
-    public String getModifiedDate() {
-        return modifiedDate;
-    }
+	 * @return the passwordLastSetTime
+	 */
+	public Date getPasswordLastSetTime() {
+		return passwordLastSetTime;
+	}
 
-    /**
-     * @param modifiedDate the modifiedDate to set
-     */
-    public void setModifiedDate(String modifiedDate) {
-        this.modifiedDate = modifiedDate;
-    }
+	/**
+	 * @param passwordLastSetTime the passwordLastSetTime to set
+	 */
+	public void setPasswordLastSetTime(Date passwordLastSetTime) {
+		this.passwordLastSetTime = passwordLastSetTime;
+	}
+
+	/**
+	 * @return the badPasswordTime
+	 */
+	public Date getBadPasswordTime() {
+		return badPasswordTime;
+	}
+
+	/**
+	 * @param badPasswordTime the badPasswordTime to set
+	 */
+	public void setBadPasswordTime(Date badPasswordTime) {
+		this.badPasswordTime = badPasswordTime;
+	}
+
+	/**
+	 * @return the unLockTime
+	 */
+	public Date getUnLockTime() {
+		return unLockTime;
+	}
+
+	/**
+	 * @param unLockTime the unLockTime to set
+	 */
+	public void setUnLockTime(Date unLockTime) {
+		this.unLockTime = unLockTime;
+	}
+
+	/**
+	 * @return the lastLoginTime
+	 */
+	public Date getLastLoginTime() {
+		return lastLoginTime;
+	}
+
+	/**
+	 * @param lastLoginTime the lastLoginTime to set
+	 */
+	public void setLastLoginTime(Date lastLoginTime) {
+		this.lastLoginTime = lastLoginTime;
+	}
+
+	/**
+	 * @return the lastLogoffTime
+	 */
+	public Date getLastLogoffTime() {
+		return lastLogoffTime;
+	}
+
+	/**
+	 * @param lastLogoffTime the lastLogoffTime to set
+	 */
+	public void setLastLogoffTime(Date lastLogoffTime) {
+		this.lastLogoffTime = lastLogoffTime;
+	}
+
+	/**
+	 * @return the createdDate
+	 */
+	public Date getCreatedDate() {
+		return createdDate;
+	}
+
+	/**
+	 * @param createdDate the createdDate to set
+	 */
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+	/**
+	 * @return the modifiedDate
+	 */
+	public Date getModifiedDate() {
+		return modifiedDate;
+	}
+
+	/**
+	 * @param modifiedDate the modifiedDate to set
+	 */
+	public void setModifiedDate(Date modifiedDate) {
+		this.modifiedDate = modifiedDate;
+	}
 
-    public String getTheme() {
+	public String getTheme() {
         return theme;
     }
 

+ 39 - 17
maxkey-core/src/main/java/org/dromara/maxkey/entity/apps/Apps.java

@@ -18,6 +18,7 @@
 package org.dromara.maxkey.entity.apps;
 
 import java.io.Serializable;
+import java.util.Date;
 
 import org.dromara.mybatis.jpa.entity.JpaEntity;
 
@@ -156,11 +157,11 @@ public class Apps extends JpaEntity implements Serializable {
     @Column
     protected String createdBy;
     @Column
-    protected String createdDate;
+    protected Date createdDate;
     @Column
     protected String modifiedBy;
     @Column
-    protected String modifiedDate;
+    protected Date modifiedDate;
     @Column
     protected String description;
 	@Column
@@ -512,14 +513,6 @@ public class Apps extends JpaEntity implements Serializable {
         this.createdBy = createdBy;
     }
 
-    public String getCreatedDate() {
-        return createdDate;
-    }
-
-    public void setCreatedDate(String createdDate) {
-        this.createdDate = createdDate;
-    }
-
     public String getModifiedBy() {
         return modifiedBy;
     }
@@ -528,15 +521,44 @@ public class Apps extends JpaEntity implements Serializable {
         this.modifiedBy = modifiedBy;
     }
 
-    public String getModifiedDate() {
-        return modifiedDate;
-    }
 
-    public void setModifiedDate(String modifiedDate) {
-        this.modifiedDate = modifiedDate;
-    }
+    /**
+	 * @return the createdDate
+	 */
+	public Date getCreatedDate() {
+		return createdDate;
+	}
+
+
+
+	/**
+	 * @param createdDate the createdDate to set
+	 */
+	public void setCreatedDate(Date createdDate) {
+		this.createdDate = createdDate;
+	}
+
+
+
+	/**
+	 * @return the modifiedDate
+	 */
+	public Date getModifiedDate() {
+		return modifiedDate;
+	}
+
+
+
+	/**
+	 * @param modifiedDate the modifiedDate to set
+	 */
+	public void setModifiedDate(Date modifiedDate) {
+		this.modifiedDate = modifiedDate;
+	}
+
+
 
-    public int getStatus() {
+	public int getStatus() {
         return status;
     }
 

+ 7 - 7
maxkey-core/src/main/java/org/dromara/maxkey/persistence/repository/LoginRepository.java

@@ -303,15 +303,15 @@ public class LoginRepository {
             userInfo.setAppLoginPassword(rs.getString("apploginpassword"));
             userInfo.setProtectedApps(rs.getString("protectedapps"));
 
-            userInfo.setPasswordLastSetTime(rs.getString("passwordlastsettime"));
+            userInfo.setPasswordLastSetTime(rs.getTimestamp("passwordlastsettime"));
             userInfo.setPasswordSetType(rs.getInt("passwordsettype"));
             userInfo.setBadPasswordCount(rs.getInt("badpasswordcount"));
-            userInfo.setBadPasswordTime(rs.getString("badpasswordtime"));
-            userInfo.setUnLockTime(rs.getString("unlocktime"));
+            userInfo.setBadPasswordTime(rs.getTimestamp("badpasswordtime"));
+            userInfo.setUnLockTime(rs.getTimestamp("unlocktime"));
             userInfo.setIsLocked(rs.getInt("islocked"));
-            userInfo.setLastLoginTime(rs.getString("lastlogintime"));
+            userInfo.setLastLoginTime(rs.getTimestamp("lastlogintime"));
             userInfo.setLastLoginIp(rs.getString("lastloginip"));
-            userInfo.setLastLogoffTime(rs.getString("lastlogofftime"));
+            userInfo.setLastLogoffTime(rs.getTimestamp("lastlogofftime"));
             userInfo.setLoginCount(rs.getInt("logincount"));
             userInfo.setRegionHistory(rs.getString("regionhistory"));
             userInfo.setPasswordHistory(rs.getString("passwordhistory"));
@@ -359,9 +359,9 @@ public class LoginRepository {
             userInfo.setExtraAttribute(rs.getString("extraattribute"));
 
             userInfo.setCreatedBy(rs.getString("createdby"));
-            userInfo.setCreatedDate(rs.getString("createddate"));
+            userInfo.setCreatedDate(rs.getTimestamp("createddate"));
             userInfo.setModifiedBy(rs.getString("modifiedby"));
-            userInfo.setModifiedDate(rs.getString("modifieddate"));
+            userInfo.setModifiedDate(rs.getTimestamp("modifieddate"));
 
             userInfo.setStatus(rs.getInt("status"));
             userInfo.setGridList(rs.getInt("gridlist"));

+ 7 - 17
maxkey-core/src/main/java/org/dromara/maxkey/persistence/repository/PasswordPolicyValidator.java

@@ -31,7 +31,6 @@ import org.dromara.maxkey.web.WebConstants;
 import org.dromara.maxkey.web.WebContext;
 import org.joda.time.DateTime;
 import org.joda.time.Duration;
-import org.joda.time.format.DateTimeFormat;
 import org.passay.PasswordData;
 import org.passay.PasswordValidator;
 import org.passay.RuleResult;
@@ -120,15 +119,10 @@ public class PasswordPolicyValidator {
         /*
          * check login attempts fail times
          */
-        if (userInfo.getBadPasswordCount() >= passwordPolicy.getAttempts()) {
-            _logger.debug("login Attempts is " + userInfo.getBadPasswordCount());
-            //duration
-            String badPasswordTimeString = userInfo.getBadPasswordTime().substring(0, 19);
-            _logger.trace("bad Password Time " + badPasswordTimeString);
-            
-            DateTime badPasswordTime = DateTime.parse(badPasswordTimeString,
-                    DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss"));
-            Duration duration = new Duration(badPasswordTime, currentdateTime);
+        if (userInfo.getBadPasswordCount() >= passwordPolicy.getAttempts() && userInfo.getBadPasswordTime() != null) {
+            _logger.debug("login Attempts is {} , bad Password Time {}" , userInfo.getBadPasswordCount(),userInfo.getBadPasswordTime());
+           
+            Duration duration = new Duration(new DateTime(userInfo.getBadPasswordTime()), currentdateTime);
             int intDuration = Integer.parseInt(duration.getStandardMinutes() + "");
             _logger.debug("bad Password duration {} , " + 
                           "password policy Duration {} , "+
@@ -191,13 +185,9 @@ public class PasswordPolicyValidator {
         * check password is Expired,Expiration is Expired date ,if Expiration equals 0,not need check
         *
         */
-       if (passwordPolicy.getExpiration() > 0) {
-           String passwordLastSetTimeString = userInfo.getPasswordLastSetTime().substring(0, 19);
-           _logger.info("last password set date {}" , passwordLastSetTimeString);
-
-           DateTime changePwdDateTime = DateTime.parse(passwordLastSetTimeString,
-                   DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss"));
-           Duration duration = new Duration(changePwdDateTime, currentdateTime);
+       if (passwordPolicy.getExpiration() > 0 && userInfo.getPasswordLastSetTime() != null) {
+           _logger.info("last password set date {}" , userInfo.getPasswordLastSetTime());
+           Duration duration = new Duration(new DateTime(userInfo.getPasswordLastSetTime()), currentdateTime);
            int intDuration = Integer.parseInt(duration.getStandardDays() + "");
            _logger.debug("password Last Set duration day {} , " +
                          "password policy Expiration {} , " +

+ 4 - 3
maxkey-persistence/src/main/java/org/dromara/maxkey/persistence/service/UserInfoService.java

@@ -19,6 +19,7 @@ package org.dromara.maxkey.persistence.service;
 
 
 import java.sql.Types;
+import java.util.Date;
 
 import org.dromara.maxkey.constants.ConstsStatus;
 import org.dromara.maxkey.crypto.password.PasswordReciprocal;
@@ -198,7 +199,7 @@ public class UserInfoService extends JpaService<UserInfo> {
 	
 	public boolean updateProtectedApps(UserInfo userinfo) {
 		try {
-			userinfo.setModifiedDate(DateUtils.getCurrentDateTimeAsString());
+			userinfo.setModifiedDate(new Date());
 			return getMapper().updateProtectedApps(userinfo) > 0;
 		} catch (Exception e) {
 			e.printStackTrace();
@@ -247,7 +248,7 @@ public class UserInfoService extends JpaService<UserInfo> {
     	    changePassword.setDecipherable(PasswordReciprocal.getInstance().encode(changePassword.getPassword()));
             _logger.debug("decipherable : "+changePassword.getDecipherable());
             changePassword.setPassword(password);
-            changePassword.setPasswordLastSetTime(DateUtils.getCurrentDateTimeAsString());
+            changePassword.setPasswordLastSetTime(new Date());
             
 	    }else {
 	    	changePassword.setPassword(null);
@@ -343,7 +344,7 @@ public class UserInfoService extends JpaService<UserInfo> {
 	
 	public boolean updateAppLoginPassword(UserInfo userinfo) {
 		try {
-			userinfo.setModifiedDate(DateUtils.getCurrentDateTimeAsString());
+			userinfo.setModifiedDate(new Date());
 			return getMapper().updateAppLoginPassword(userinfo) > 0;
 		} catch (Exception e) {
 			e.printStackTrace();

+ 1 - 1
maxkey-persistence/src/main/resources/org/dromara/maxkey/persistence/mapper/xml/mysql/HistoryLoginAppsMapper.xml

@@ -42,7 +42,7 @@
 			userId,
 			username,
 			displayname,
-			date_format(logintime, '%Y-%m-%d  %H:%i:%s') as logintime
+			logintime
 			 
     	from mxk_history_login_apps
     	where	instid   =   #{instId} 

+ 4 - 4
maxkey-persistence/src/main/resources/org/dromara/maxkey/persistence/mapper/xml/mysql/HistoryLoginMapper.xml

@@ -54,8 +54,8 @@
 			platform,
 			application,
 			loginurl,
-			date_format(logintime, '%Y-%m-%d  %H:%i:%s') as logintime,
-			date_format(logouttime, '%Y-%m-%d  %H:%i:%s') as logouttime
+			logintime,
+			logouttime
     	from mxk_history_login
     	where	instid   =   #{instId} 
     	<include refid="dao_where_statement"/>
@@ -80,8 +80,8 @@
             platform,
             application,
             loginurl,
-            date_format(logintime, '%Y-%m-%d  %H:%i:%s') as logintime,
-            date_format(logouttime, '%Y-%m-%d  %H:%i:%s') as logouttime
+            logintime,
+            logouttime
         from mxk_history_login
         where   instid   =   #{instId}  
             and sessionstatus = 1

+ 1 - 1
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/dromara/maxkey/authz/oidc/idtoken/OIDCIdTokenEnhancer.java

@@ -125,7 +125,7 @@ public class OIDCIdTokenEnhancer implements TokenEnhancer {
 			if (request.getExtensions().containsKey("max_age")
 					|| (request.getExtensions().containsKey("idtoken")) // parse the ID Token claims (#473) -- for now assume it could be in there
 					) {
-				DateTime loginDate = DateTime.parse(AuthorizationUtils.getUserInfo().getLastLoginTime(), DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss"));
+				DateTime loginDate =new  DateTime(AuthorizationUtils.getUserInfo().getLastLoginTime());
 				builder.claim("auth_time",  loginDate.getMillis()/1000);
 			}
 			

+ 0 - 1
maxkey-synchronizers/maxkey-synchronizer-activedirectory/src/main/java/org/dromara/maxkey/synchronizer/activedirectory/ActiveDirectoryOrganizationService.java

@@ -101,7 +101,6 @@ public class ActiveDirectoryOrganizationService  extends AbstractSynchronizerSer
 													organization.getId(),
 													organization.getOrgName(),
 													Organizations.class.getSimpleName(),
-													org.dromara.maxkey.util.DateUtils.getCurrentDateAsString(),
 													"success",
 													synchronizer.getInstId());
 			           this.historySynchronizerService.insert(historySynchronizer);

+ 4 - 6
maxkey-web-apis/maxkey-web-api-scim/src/main/java/org/dromara/maxkey/web/apis/identity/scim/ScimGroupController.java

@@ -140,13 +140,11 @@ public class ScimGroupController {
     	scimGroup.setDisplayName(group.getGroupName());
     	
     	ScimMeta meta = new ScimMeta("Group");
-        if(StringUtils.isNotBlank(group.getCreatedDate())){
-        	meta.setCreated(
-        			DateUtils.parse(group.getCreatedDate(), DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS));
+        if(group.getCreatedDate()!= null){
+        	meta.setCreated(group.getCreatedDate());
         }
-        if(StringUtils.isNotBlank(group.getModifiedDate())){
-        	meta.setLastModified(
-        			DateUtils.parse(group.getModifiedDate(), DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS));
+        if(group.getModifiedDate()!= null){
+        	meta.setLastModified(group.getModifiedDate());
         }
         scimGroup.setMeta(meta);
         

+ 4 - 6
maxkey-web-apis/maxkey-web-api-scim/src/main/java/org/dromara/maxkey/web/apis/identity/scim/ScimOrganizationController.java

@@ -157,13 +157,11 @@ public class ScimOrganizationController {
         
         ScimMeta meta = new ScimMeta("Organization");
         
-        if(StringUtils.isNotBlank(org.getCreatedDate())){
-        	meta.setCreated(
-        			DateUtils.parse(org.getCreatedDate(), DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS));
+        if(org.getCreatedDate()!= null){
+        	meta.setCreated(org.getCreatedDate());
         }
-        if(StringUtils.isNotBlank(org.getModifiedDate())){
-        	meta.setLastModified(
-        			DateUtils.parse(org.getModifiedDate(), DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS));
+        if(org.getModifiedDate()!= null){
+        	meta.setLastModified(org.getModifiedDate());
         }
         scimOrg.setMeta(meta);
         return scimOrg;

+ 4 - 6
maxkey-web-apis/maxkey-web-api-scim/src/main/java/org/dromara/maxkey/web/apis/identity/scim/ScimUserController.java

@@ -217,13 +217,11 @@ public class ScimUserController {
     	}
     	
         ScimMeta meta = new ScimMeta("User");
-        if(StringUtils.isNotBlank(userInfo.getCreatedDate())){
-        	meta.setCreated(
-        			DateUtils.parse(userInfo.getCreatedDate(), DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS));
+        if(userInfo.getCreatedDate()!= null){
+        	meta.setCreated(userInfo.getCreatedDate());
         }
-        if(StringUtils.isNotBlank(userInfo.getModifiedDate())){
-        	meta.setLastModified(
-        			DateUtils.parse(userInfo.getModifiedDate(), DateUtils.FORMAT_DATE_YYYY_MM_DD_HH_MM_SS));
+        if(userInfo.getModifiedDate()!= null){
+        	meta.setLastModified(userInfo.getModifiedDate());
         }
         scimUser.setMeta(meta);
     	return scimUser;

+ 1 - 1
maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/web/idm/contorller/UserInfoController.java

@@ -319,7 +319,7 @@ public class UserInfoController {
 	
 	public UserInfo buildUserFromSheetRow(Row row,UserInfo currentUser) {
 		UserInfo userInfo = new UserInfo();
-        userInfo.setCreatedDate(DateUtils.formatDateTime(new Date()));
+        userInfo.setCreatedDate(new Date());
 		// 登录账号
 		userInfo.setUsername(ExcelUtils.getValue(row, 0));
 		// 密码