dept tree select
This commit is contained in:
@@ -50,7 +50,6 @@ public class Groups extends JpaBaseEntity implements Serializable {
|
||||
String orgIdsList;
|
||||
@Column
|
||||
String resumeTime;
|
||||
|
||||
@Column
|
||||
String suspendTime;
|
||||
|
||||
|
||||
@@ -69,11 +69,14 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
||||
@Column
|
||||
private String logo;
|
||||
@Column
|
||||
private String domain;
|
||||
@Column
|
||||
private String frontTitle;
|
||||
@Column
|
||||
private String consoleTitle;
|
||||
private String consoleDomain;
|
||||
@Column
|
||||
private String domain;
|
||||
private String consoleTitle;
|
||||
|
||||
@Column
|
||||
private String captchaType;
|
||||
@Column
|
||||
@@ -135,6 +138,14 @@ public class Institutions extends JpaBaseEntity implements Serializable {
|
||||
this.captchaType = captchaType;
|
||||
}
|
||||
|
||||
public String getConsoleDomain() {
|
||||
return consoleDomain;
|
||||
}
|
||||
|
||||
public void setConsoleDomain(String consoleDomain) {
|
||||
this.consoleDomain = consoleDomain;
|
||||
}
|
||||
|
||||
public String getConsoleTitle() {
|
||||
return consoleTitle;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ public class Resources extends JpaBaseEntity implements Serializable {
|
||||
@Column
|
||||
String name;
|
||||
@Column
|
||||
String permission;
|
||||
@Column
|
||||
int sortIndex;
|
||||
@Column
|
||||
String appId;
|
||||
@@ -108,7 +110,15 @@ public class Resources extends JpaBaseEntity implements Serializable {
|
||||
this.appName = appName;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
public String getPermission() {
|
||||
return permission;
|
||||
}
|
||||
|
||||
public void setPermission(String permission) {
|
||||
this.permission = permission;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,10 @@ public class Roles extends JpaBaseEntity implements Serializable {
|
||||
@Column
|
||||
String orgIdsList;
|
||||
@Column
|
||||
String resumeTime;
|
||||
@Column
|
||||
String suspendTime;
|
||||
@Column
|
||||
String status;
|
||||
@Column
|
||||
String description;
|
||||
@@ -154,7 +158,23 @@ public class Roles extends JpaBaseEntity implements Serializable {
|
||||
this.orgIdsList = orgIdsList;
|
||||
}
|
||||
|
||||
public String getInstId() {
|
||||
public String getResumeTime() {
|
||||
return resumeTime;
|
||||
}
|
||||
|
||||
public void setResumeTime(String resumeTime) {
|
||||
this.resumeTime = resumeTime;
|
||||
}
|
||||
|
||||
public String getSuspendTime() {
|
||||
return suspendTime;
|
||||
}
|
||||
|
||||
public void setSuspendTime(String suspendTime) {
|
||||
this.suspendTime = suspendTime;
|
||||
}
|
||||
|
||||
public String getInstId() {
|
||||
return instId;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class InstitutionsRepository {
|
||||
private static Logger _logger = LoggerFactory.getLogger(InstitutionsRepository.class);
|
||||
|
||||
private static final String SELECT_STATEMENT =
|
||||
"select * from mxk_institutions where id = ? or domain = ? " ;
|
||||
"select * from mxk_institutions where id = ? or domain = ? or consoledomain = ?" ;
|
||||
|
||||
private static final String DEFAULT_INSTID = "1";
|
||||
|
||||
@@ -69,13 +69,14 @@ public class InstitutionsRepository {
|
||||
Institutions inst = institutionsStore.getIfPresent(mapper.get(instIdOrDomain)==null ? DEFAULT_INSTID : mapper.get(instIdOrDomain) );
|
||||
if(inst == null) {
|
||||
List<Institutions> institutions =
|
||||
jdbcTemplate.query(SELECT_STATEMENT,new InstitutionsRowMapper(),instIdOrDomain,instIdOrDomain);
|
||||
jdbcTemplate.query(SELECT_STATEMENT,new InstitutionsRowMapper(),instIdOrDomain,instIdOrDomain,instIdOrDomain);
|
||||
|
||||
if (institutions != null && institutions.size() > 0) {
|
||||
inst = institutions.get(0);
|
||||
}
|
||||
if(inst != null ) {
|
||||
institutionsStore.put(inst.getDomain(), inst);
|
||||
institutionsStore.put(inst.getConsoleDomain(), inst);
|
||||
mapper.put(inst.getId(), inst.getDomain());
|
||||
}
|
||||
}
|
||||
@@ -93,6 +94,7 @@ public class InstitutionsRepository {
|
||||
institution.setLogo(rs.getString("logo"));
|
||||
institution.setDomain(rs.getString("domain"));
|
||||
institution.setFrontTitle(rs.getString("fronttitle"));
|
||||
institution.setConsoleDomain(rs.getString("consoledomain"));
|
||||
institution.setConsoleTitle(rs.getString("consoletitle"));
|
||||
institution.setCaptchaType(rs.getString("captchatype"));
|
||||
institution.setCaptchaSupport(rs.getString("captchasupport"));
|
||||
|
||||
Reference in New Issue
Block a user