日期类型调整为date

This commit is contained in:
MaxKey 2024-05-04 07:28:36 +08:00
parent 9ff95bf74a
commit ce09413c79
37 changed files with 425 additions and 355 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -17,6 +17,8 @@
package org.dromara.maxkey.entity; package org.dromara.maxkey.entity;
import java.util.Date;
import org.dromara.mybatis.jpa.entity.JpaEntity; import org.dromara.mybatis.jpa.entity.JpaEntity;
public class ChangePassword extends JpaEntity{ public class ChangePassword extends JpaEntity{
@ -40,7 +42,7 @@ public class ChangePassword extends JpaEntity{
private String decipherable; private String decipherable;
private String instId; private String instId;
private int passwordSetType; 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; return passwordLastSetTime;
} }
public void setPasswordLastSetTime(Date passwordLastSetTime) {
public void setPasswordLastSetTime(String passwordLastSetTime) {
this.passwordLastSetTime = passwordLastSetTime; this.passwordLastSetTime = passwordLastSetTime;
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -125,7 +125,7 @@ public class OIDCIdTokenEnhancer implements TokenEnhancer {
if (request.getExtensions().containsKey("max_age") if (request.getExtensions().containsKey("max_age")
|| (request.getExtensions().containsKey("idtoken")) // parse the ID Token claims (#473) -- for now assume it could be in there || (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); builder.claim("auth_time", loginDate.getMillis()/1000);
} }

View File

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

View File

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

View File

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

View File

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

View File

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