mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
Removed Unused Setters and Getters also Added Lombok to add Setters and Getters through Annotation and Refractored Code
This commit is contained in:
parent
b9d13e69d0
commit
2c79bf6c80
@ -3,6 +3,10 @@ description = "maxkey-core"
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation project(":maxkey-common")
|
implementation project(":maxkey-common")
|
||||||
|
|
||||||
|
// https://projectlombok.org
|
||||||
|
compileOnly 'org.projectlombok:lombok:1.18.4'
|
||||||
|
annotationProcessor 'org.projectlombok:lombok:1.18.4'
|
||||||
|
|
||||||
//local jars
|
//local jars
|
||||||
implementation fileTree(dir: '../maxkey-lib/', include: '*/*.jar')
|
implementation fileTree(dir: '../maxkey-lib/', include: '*/*.jar')
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,9 @@ import javax.persistence.GeneratedValue;
|
|||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
||||||
import org.hibernate.validator.constraints.Length;
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
@ -43,6 +46,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
|||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "MXK_ACCOUNTS")
|
@Table(name = "MXK_ACCOUNTS")
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
public class Accounts extends JpaBaseEntity implements Serializable {
|
public class Accounts extends JpaBaseEntity implements Serializable {
|
||||||
private static final long serialVersionUID = 6829592256223630307L;
|
private static final long serialVersionUID = 6829592256223630307L;
|
||||||
|
|
||||||
@ -106,143 +111,12 @@ public class Accounts extends JpaBaseEntity implements Serializable {
|
|||||||
this.relatedPassword = password;
|
this.relatedPassword = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUsername() {
|
|
||||||
return username;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUsername(String username) {
|
|
||||||
this.username = username;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDisplayName() {
|
|
||||||
return displayName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDisplayName(String displayName) {
|
|
||||||
this.displayName = displayName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppId() {
|
|
||||||
return appId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppId(String appId) {
|
|
||||||
this.appId = appId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppName() {
|
|
||||||
return appName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppName(String appName) {
|
|
||||||
this.appName = appName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRelatedUsername() {
|
|
||||||
return relatedUsername;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRelatedUsername(String relatedUsername) {
|
|
||||||
this.relatedUsername = relatedUsername;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRelatedPassword() {
|
|
||||||
return relatedPassword;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRelatedPassword(String relatedPassword) {
|
|
||||||
this.relatedPassword = relatedPassword;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setId(String id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UserInfo getUserInfo() {
|
|
||||||
return userInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserInfo(UserInfo userInfo) {
|
|
||||||
this.userInfo = userInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String getCreateType() {
|
|
||||||
return createType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateType(String createType) {
|
|
||||||
this.createType = createType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStrategyId() {
|
|
||||||
return strategyId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStrategyId(String strategyId) {
|
|
||||||
this.strategyId = strategyId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getStatus() {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(int status) {
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HashMap<String, OrganizationsCast> getOrgCast() {
|
|
||||||
return orgCast;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrgCast(HashMap<String, OrganizationsCast> orgCast) {
|
|
||||||
this.orgCast = orgCast;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrgCast(List<OrganizationsCast> listOrgCast) {
|
public void setOrgCast(List<OrganizationsCast> listOrgCast) {
|
||||||
for (OrganizationsCast cast : listOrgCast) {
|
for (OrganizationsCast cast : listOrgCast) {
|
||||||
this.orgCast.put(cast.getProvider(), cast);
|
this.orgCast.put(cast.getProvider(), cast);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStrategyName() {
|
|
||||||
return strategyName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStrategyName(String strategyName) {
|
|
||||||
this.strategyName = strategyName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInstId() {
|
|
||||||
return instId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInstId(String instId) {
|
|
||||||
this.instId = instId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInstName() {
|
|
||||||
return instName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInstName(String instName) {
|
|
||||||
this.instName = instName;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "AppAccounts [uid=" + userId + ", username=" + username + ", displayName=" + displayName + ", appId="
|
return "AppAccounts [uid=" + userId + ", username=" + username + ", displayName=" + displayName + ", appId="
|
||||||
|
|||||||
@ -26,10 +26,15 @@ import javax.persistence.GeneratedValue;
|
|||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "MXK_ACCOUNTS_STRATEGY")
|
@Table(name = "MXK_ACCOUNTS_STRATEGY")
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
public class AccountsStrategy extends JpaBaseEntity implements Serializable {
|
public class AccountsStrategy extends JpaBaseEntity implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -80,158 +85,6 @@ public class AccountsStrategy extends JpaBaseEntity implements Serializable {
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(String id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus() {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(String status) {
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreatedBy() {
|
|
||||||
return createdBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreatedBy(String createdBy) {
|
|
||||||
this.createdBy = createdBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreatedDate() {
|
|
||||||
return createdDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreatedDate(String createdDate) {
|
|
||||||
this.createdDate = createdDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getModifiedBy() {
|
|
||||||
return modifiedBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setModifiedBy(String modifiedBy) {
|
|
||||||
this.modifiedBy = modifiedBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getModifiedDate() {
|
|
||||||
return modifiedDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setModifiedDate(String modifiedDate) {
|
|
||||||
this.modifiedDate = modifiedDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFilters() {
|
|
||||||
return filters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFilters(String filters) {
|
|
||||||
this.filters = filters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOrgIdsList() {
|
|
||||||
return orgIdsList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrgIdsList(String orgIdsList) {
|
|
||||||
this.orgIdsList = orgIdsList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppId() {
|
|
||||||
return appId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppId(String appId) {
|
|
||||||
this.appId = appId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppName() {
|
|
||||||
return appName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppName(String appName) {
|
|
||||||
this.appName = appName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMapping() {
|
|
||||||
return mapping;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMapping(String mapping) {
|
|
||||||
this.mapping = mapping;
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte[] getAppIcon() {
|
|
||||||
return appIcon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppIconBase64() {
|
|
||||||
return appIconBase64;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppIconBase64(String appIconBase64) {
|
|
||||||
this.appIconBase64 = appIconBase64;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppIcon(byte[] appIcon) {
|
|
||||||
this.appIcon = appIcon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreateType() {
|
|
||||||
return createType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateType(String createType) {
|
|
||||||
this.createType = createType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSuffixes() {
|
|
||||||
return suffixes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSuffixes(String suffixes) {
|
|
||||||
this.suffixes = suffixes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInstId() {
|
|
||||||
return instId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInstId(String instId) {
|
|
||||||
this.instId = instId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInstName() {
|
|
||||||
return instName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInstName(String instName) {
|
|
||||||
this.instName = instName;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void transIconBase64() {
|
public void transIconBase64() {
|
||||||
if (this.appIcon != null) {
|
if (this.appIcon != null) {
|
||||||
@ -274,6 +127,4 @@ public class AccountsStrategy extends JpaBaseEntity implements Serializable {
|
|||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,6 @@ public class ConfigurerFreeMarker implements ApplicationContextAware {
|
|||||||
@Autowired
|
@Autowired
|
||||||
Configuration configuration;
|
Configuration configuration;
|
||||||
|
|
||||||
|
|
||||||
@PostConstruct // 在项目启动时执行方法
|
@PostConstruct // 在项目启动时执行方法
|
||||||
public void setSharedVariable() throws IOException, TemplateException {
|
public void setSharedVariable() throws IOException, TemplateException {
|
||||||
// 根据注解FreemarkerTag获取bean ,key is bean name ,value is bean object
|
// 根据注解FreemarkerTag获取bean ,key is bean name ,value is bean object
|
||||||
@ -52,13 +51,11 @@ public class ConfigurerFreeMarker implements ApplicationContextAware {
|
|||||||
configuration.setSharedVariable(key, map.get(key));
|
configuration.setSharedVariable(key, map.get(key));
|
||||||
_logger.trace("FreeMarker Template "+key);
|
_logger.trace("FreeMarker Template "+key);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||||
this.applicationContext = applicationContext;
|
this.applicationContext = applicationContext;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user