diff --git a/backend/pom.xml b/backend/pom.xml index 6de71fa692..b2216cd9b2 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -17,7 +17,6 @@ 1.8 20.1.0 3.12.1 - 3.1.1 @@ -315,70 +314,12 @@ ehcache 2.9.1 - - - org.apache.hbase - hbase-client - 2.4.1 - - - org.apache.hbase - hbase-common - 2.4.1 - - - org.apache.hbase - hbase-mapreduce - 2.4.1 - - org.testng testng 6.8 test - - - org.apache.spark - spark-core_2.12 - ${spark.version} - - - org.slf4j - slf4j-log4j12 - - - log4j - log4j - - - org.objenesis - objenesis - - - provided - - - - org.apache.spark - spark-streaming_2.12 - ${spark.version} - provided - - - - org.apache.spark - spark-sql_2.12 - ${spark.version} - - - janino - org.codehaus.janino - - - - org.codehaus.janino janino @@ -400,27 +341,16 @@ metastore 8.3.0.18-1084 - - pentaho - pentaho-big-data-kettle-plugins-hbase-meta - 8.3.0.18-1084 - - - pentaho - pentaho-big-data-kettle-plugins-hbase - 8.3.0.18-1084 - - - pentaho - pentaho-big-data-impl-cluster - 8.3.0.18-1084 - org.pentaho.di.plugins pdi-engine-configuration-impl 8.3.0.7-683 - + + c3p0 + c3p0 + 0.9.1.2 + diff --git a/backend/src/main/java/io/dataease/auth/api/dto/CurrentRoleDto.java b/backend/src/main/java/io/dataease/auth/api/dto/CurrentRoleDto.java index 1b9d86d16f..9b72125543 100644 --- a/backend/src/main/java/io/dataease/auth/api/dto/CurrentRoleDto.java +++ b/backend/src/main/java/io/dataease/auth/api/dto/CurrentRoleDto.java @@ -9,7 +9,7 @@ public class CurrentRoleDto implements Serializable { private Long id; - private String code; +// private String code; private String name; } diff --git a/backend/src/main/java/io/dataease/auth/api/dto/DynamicMenuDto.java b/backend/src/main/java/io/dataease/auth/api/dto/DynamicMenuDto.java index d79a6e6bbd..2121aaf1c7 100644 --- a/backend/src/main/java/io/dataease/auth/api/dto/DynamicMenuDto.java +++ b/backend/src/main/java/io/dataease/auth/api/dto/DynamicMenuDto.java @@ -25,6 +25,8 @@ public class DynamicMenuDto implements Serializable { private String permission; + private Boolean hidden; + private List children; } diff --git a/backend/src/main/java/io/dataease/auth/config/F2CRealm.java b/backend/src/main/java/io/dataease/auth/config/F2CRealm.java index 46b942ef48..719f6db9d9 100644 --- a/backend/src/main/java/io/dataease/auth/config/F2CRealm.java +++ b/backend/src/main/java/io/dataease/auth/config/F2CRealm.java @@ -68,6 +68,9 @@ public class F2CRealm extends AuthorizingRealm { if (user == null) { throw new AuthenticationException("User didn't existed!"); } + if (user.getEnabled()==0) { + throw new AuthenticationException("User is valid!"); + } String pass = null; try { pass = user.getPassword(); diff --git a/backend/src/main/java/io/dataease/auth/server/AuthServer.java b/backend/src/main/java/io/dataease/auth/server/AuthServer.java index 6c454034f7..56211cab1d 100644 --- a/backend/src/main/java/io/dataease/auth/server/AuthServer.java +++ b/backend/src/main/java/io/dataease/auth/server/AuthServer.java @@ -35,10 +35,14 @@ public class AuthServer implements AuthApi { String username = loginDto.getUsername(); String password = loginDto.getPassword(); SysUserEntity user = authUserService.getUserByName(username); - String realPwd = user.getPassword(); + if (ObjectUtils.isEmpty(user)){ throw new RuntimeException("没有该用户!"); } + if (user.getEnabled()==0){ + throw new RuntimeException("用户已经失效!"); + } + String realPwd = user.getPassword(); //私钥解密 String pwd = RsaUtil.decryptByPrivateKey(RsaProperties.privateKey, password); //md5加密 diff --git a/backend/src/main/java/io/dataease/auth/service/impl/DynamicMenuServiceImpl.java b/backend/src/main/java/io/dataease/auth/service/impl/DynamicMenuServiceImpl.java index 1d256f478b..3004bf553c 100644 --- a/backend/src/main/java/io/dataease/auth/service/impl/DynamicMenuServiceImpl.java +++ b/backend/src/main/java/io/dataease/auth/service/impl/DynamicMenuServiceImpl.java @@ -42,6 +42,7 @@ public class DynamicMenuServiceImpl implements DynamicMenuService { menuMeta.setIcon(sysMenu.getIcon()); dynamicMenuDto.setMeta(menuMeta); dynamicMenuDto.setPermission(sysMenu.getPermission()); + dynamicMenuDto.setHidden(sysMenu.getHidden()); return dynamicMenuDto; } diff --git a/backend/src/main/java/io/dataease/auth/util/JWTUtils.java b/backend/src/main/java/io/dataease/auth/util/JWTUtils.java index 9b171a936f..8dbed6faf2 100644 --- a/backend/src/main/java/io/dataease/auth/util/JWTUtils.java +++ b/backend/src/main/java/io/dataease/auth/util/JWTUtils.java @@ -13,6 +13,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authc.AuthenticationException; import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; +import org.springframework.core.env.Environment; + import java.util.Date; @@ -22,7 +24,9 @@ public class JWTUtils { // token过期时间1min (过期会自动刷新续命 目的是避免一直都是同一个token ) private static final long EXPIRE_TIME = 1*60*1000; // 登录间隔时间10min 超过这个时间强制重新登录 - private static final long Login_Interval = 10*60*1000; + private static long Login_Interval; + + /** @@ -79,6 +83,11 @@ public class JWTUtils { * @return */ public static boolean loginExpire(String token){ + if (Login_Interval==0) { + String property = CommonBeanFactory.getBean(Environment.class).getProperty("dataease.login_timeout"); + int seconds = StringUtils.isNotEmpty(property) ? Integer.parseInt(property): (10*60); + Login_Interval = seconds * 1000; + } Long now = System.currentTimeMillis(); Long lastOperateTime = tokenLastOperateTime(token); boolean isExpire = false; @@ -169,4 +178,5 @@ public class JWTUtils { long now = System.currentTimeMillis(); tokens_expire.put(token, now); } + } diff --git a/backend/src/main/java/io/dataease/base/domain/DatasetTableField.java b/backend/src/main/java/io/dataease/base/domain/DatasetTableField.java index 9cd293962b..360ab4b24e 100644 --- a/backend/src/main/java/io/dataease/base/domain/DatasetTableField.java +++ b/backend/src/main/java/io/dataease/base/domain/DatasetTableField.java @@ -18,13 +18,15 @@ public class DatasetTableField implements Serializable { private String type; + private Integer size; + + private Integer deType; + private Boolean checked; private Integer columnIndex; private Long lastSyncTime; - private Integer deType; - private static final long serialVersionUID = 1L; -} +} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/domain/DatasetTableFieldExample.java b/backend/src/main/java/io/dataease/base/domain/DatasetTableFieldExample.java index 4b4a354d34..462a9a2b31 100644 --- a/backend/src/main/java/io/dataease/base/domain/DatasetTableFieldExample.java +++ b/backend/src/main/java/io/dataease/base/domain/DatasetTableFieldExample.java @@ -454,6 +454,126 @@ public class DatasetTableFieldExample { return (Criteria) this; } + public Criteria andSizeIsNull() { + addCriterion("`size` is null"); + return (Criteria) this; + } + + public Criteria andSizeIsNotNull() { + addCriterion("`size` is not null"); + return (Criteria) this; + } + + public Criteria andSizeEqualTo(Integer value) { + addCriterion("`size` =", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotEqualTo(Integer value) { + addCriterion("`size` <>", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThan(Integer value) { + addCriterion("`size` >", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThanOrEqualTo(Integer value) { + addCriterion("`size` >=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThan(Integer value) { + addCriterion("`size` <", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThanOrEqualTo(Integer value) { + addCriterion("`size` <=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeIn(List values) { + addCriterion("`size` in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotIn(List values) { + addCriterion("`size` not in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeBetween(Integer value1, Integer value2) { + addCriterion("`size` between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotBetween(Integer value1, Integer value2) { + addCriterion("`size` not between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andDeTypeIsNull() { + addCriterion("de_type is null"); + return (Criteria) this; + } + + public Criteria andDeTypeIsNotNull() { + addCriterion("de_type is not null"); + return (Criteria) this; + } + + public Criteria andDeTypeEqualTo(Integer value) { + addCriterion("de_type =", value, "deType"); + return (Criteria) this; + } + + public Criteria andDeTypeNotEqualTo(Integer value) { + addCriterion("de_type <>", value, "deType"); + return (Criteria) this; + } + + public Criteria andDeTypeGreaterThan(Integer value) { + addCriterion("de_type >", value, "deType"); + return (Criteria) this; + } + + public Criteria andDeTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("de_type >=", value, "deType"); + return (Criteria) this; + } + + public Criteria andDeTypeLessThan(Integer value) { + addCriterion("de_type <", value, "deType"); + return (Criteria) this; + } + + public Criteria andDeTypeLessThanOrEqualTo(Integer value) { + addCriterion("de_type <=", value, "deType"); + return (Criteria) this; + } + + public Criteria andDeTypeIn(List values) { + addCriterion("de_type in", values, "deType"); + return (Criteria) this; + } + + public Criteria andDeTypeNotIn(List values) { + addCriterion("de_type not in", values, "deType"); + return (Criteria) this; + } + + public Criteria andDeTypeBetween(Integer value1, Integer value2) { + addCriterion("de_type between", value1, value2, "deType"); + return (Criteria) this; + } + + public Criteria andDeTypeNotBetween(Integer value1, Integer value2) { + addCriterion("de_type not between", value1, value2, "deType"); + return (Criteria) this; + } + public Criteria andCheckedIsNull() { addCriterion("`checked` is null"); return (Criteria) this; @@ -633,66 +753,6 @@ public class DatasetTableFieldExample { addCriterion("last_sync_time not between", value1, value2, "lastSyncTime"); return (Criteria) this; } - - public Criteria andDeTypeIsNull() { - addCriterion("de_type is null"); - return (Criteria) this; - } - - public Criteria andDeTypeIsNotNull() { - addCriterion("de_type is not null"); - return (Criteria) this; - } - - public Criteria andDeTypeEqualTo(Integer value) { - addCriterion("de_type =", value, "deType"); - return (Criteria) this; - } - - public Criteria andDeTypeNotEqualTo(Integer value) { - addCriterion("de_type <>", value, "deType"); - return (Criteria) this; - } - - public Criteria andDeTypeGreaterThan(Integer value) { - addCriterion("de_type >", value, "deType"); - return (Criteria) this; - } - - public Criteria andDeTypeGreaterThanOrEqualTo(Integer value) { - addCriterion("de_type >=", value, "deType"); - return (Criteria) this; - } - - public Criteria andDeTypeLessThan(Integer value) { - addCriterion("de_type <", value, "deType"); - return (Criteria) this; - } - - public Criteria andDeTypeLessThanOrEqualTo(Integer value) { - addCriterion("de_type <=", value, "deType"); - return (Criteria) this; - } - - public Criteria andDeTypeIn(List values) { - addCriterion("de_type in", values, "deType"); - return (Criteria) this; - } - - public Criteria andDeTypeNotIn(List values) { - addCriterion("de_type not in", values, "deType"); - return (Criteria) this; - } - - public Criteria andDeTypeBetween(Integer value1, Integer value2) { - addCriterion("de_type between", value1, value2, "deType"); - return (Criteria) this; - } - - public Criteria andDeTypeNotBetween(Integer value1, Integer value2) { - addCriterion("de_type not between", value1, value2, "deType"); - return (Criteria) this; - } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/dataease/base/domain/SysRole.java b/backend/src/main/java/io/dataease/base/domain/SysRole.java index 88537d362d..85e561117b 100644 --- a/backend/src/main/java/io/dataease/base/domain/SysRole.java +++ b/backend/src/main/java/io/dataease/base/domain/SysRole.java @@ -7,8 +7,6 @@ import lombok.Data; public class SysRole implements Serializable { private Long roleId; - private String code; - private String name; private String description; diff --git a/backend/src/main/java/io/dataease/base/domain/SysRoleExample.java b/backend/src/main/java/io/dataease/base/domain/SysRoleExample.java index 9746df6a7a..bf2c892cdc 100644 --- a/backend/src/main/java/io/dataease/base/domain/SysRoleExample.java +++ b/backend/src/main/java/io/dataease/base/domain/SysRoleExample.java @@ -164,76 +164,6 @@ public class SysRoleExample { return (Criteria) this; } - public Criteria andCodeIsNull() { - addCriterion("code is null"); - return (Criteria) this; - } - - public Criteria andCodeIsNotNull() { - addCriterion("code is not null"); - return (Criteria) this; - } - - public Criteria andCodeEqualTo(String value) { - addCriterion("code =", value, "code"); - return (Criteria) this; - } - - public Criteria andCodeNotEqualTo(String value) { - addCriterion("code <>", value, "code"); - return (Criteria) this; - } - - public Criteria andCodeGreaterThan(String value) { - addCriterion("code >", value, "code"); - return (Criteria) this; - } - - public Criteria andCodeGreaterThanOrEqualTo(String value) { - addCriterion("code >=", value, "code"); - return (Criteria) this; - } - - public Criteria andCodeLessThan(String value) { - addCriterion("code <", value, "code"); - return (Criteria) this; - } - - public Criteria andCodeLessThanOrEqualTo(String value) { - addCriterion("code <=", value, "code"); - return (Criteria) this; - } - - public Criteria andCodeLike(String value) { - addCriterion("code like", value, "code"); - return (Criteria) this; - } - - public Criteria andCodeNotLike(String value) { - addCriterion("code not like", value, "code"); - return (Criteria) this; - } - - public Criteria andCodeIn(List values) { - addCriterion("code in", values, "code"); - return (Criteria) this; - } - - public Criteria andCodeNotIn(List values) { - addCriterion("code not in", values, "code"); - return (Criteria) this; - } - - public Criteria andCodeBetween(String value1, String value2) { - addCriterion("code between", value1, value2, "code"); - return (Criteria) this; - } - - public Criteria andCodeNotBetween(String value1, String value2) { - addCriterion("code not between", value1, value2, "code"); - return (Criteria) this; - } - public Criteria andNameIsNull() { addCriterion("`name` is null"); return (Criteria) this; diff --git a/backend/src/main/java/io/dataease/base/mapper/DatasetTableFieldMapper.xml b/backend/src/main/java/io/dataease/base/mapper/DatasetTableFieldMapper.xml index 7902706f17..6bea2c8c99 100644 --- a/backend/src/main/java/io/dataease/base/mapper/DatasetTableFieldMapper.xml +++ b/backend/src/main/java/io/dataease/base/mapper/DatasetTableFieldMapper.xml @@ -7,10 +7,11 @@ + + - @@ -71,8 +72,8 @@ - id, table_id, origin_name, `name`, `type`, `checked`, column_index, last_sync_time, - de_type + id, table_id, origin_name, `name`, `type`, `size`, de_type, `checked`, column_index, + last_sync_time @@ -197,6 +206,12 @@ `type` = #{record.type,jdbcType=VARCHAR}, + + `size` = #{record.size,jdbcType=INTEGER}, + + + de_type = #{record.deType,jdbcType=INTEGER}, + `checked` = #{record.checked,jdbcType=BIT}, @@ -206,9 +221,6 @@ last_sync_time = #{record.lastSyncTime,jdbcType=BIGINT}, - - de_type = #{record.deType,jdbcType=INTEGER}, - @@ -221,10 +233,11 @@ origin_name = #{record.originName,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR}, `type` = #{record.type,jdbcType=VARCHAR}, + `size` = #{record.size,jdbcType=INTEGER}, + de_type = #{record.deType,jdbcType=INTEGER}, `checked` = #{record.checked,jdbcType=BIT}, column_index = #{record.columnIndex,jdbcType=INTEGER}, - last_sync_time = #{record.lastSyncTime,jdbcType=BIGINT}, - de_type = #{record.deType,jdbcType=INTEGER} + last_sync_time = #{record.lastSyncTime,jdbcType=BIGINT} @@ -244,6 +257,12 @@ `type` = #{type,jdbcType=VARCHAR}, + + `size` = #{size,jdbcType=INTEGER}, + + + de_type = #{deType,jdbcType=INTEGER}, + `checked` = #{checked,jdbcType=BIT}, @@ -253,9 +272,6 @@ last_sync_time = #{lastSyncTime,jdbcType=BIGINT}, - - de_type = #{deType,jdbcType=INTEGER}, - where id = #{id,jdbcType=VARCHAR} @@ -265,10 +281,11 @@ origin_name = #{originName,jdbcType=VARCHAR}, `name` = #{name,jdbcType=VARCHAR}, `type` = #{type,jdbcType=VARCHAR}, + `size` = #{size,jdbcType=INTEGER}, + de_type = #{deType,jdbcType=INTEGER}, `checked` = #{checked,jdbcType=BIT}, column_index = #{columnIndex,jdbcType=INTEGER}, - last_sync_time = #{lastSyncTime,jdbcType=BIGINT}, - de_type = #{deType,jdbcType=INTEGER} + last_sync_time = #{lastSyncTime,jdbcType=BIGINT} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/mapper/SysRoleMapper.xml b/backend/src/main/java/io/dataease/base/mapper/SysRoleMapper.xml index 4ac1cbb63c..3af3284422 100644 --- a/backend/src/main/java/io/dataease/base/mapper/SysRoleMapper.xml +++ b/backend/src/main/java/io/dataease/base/mapper/SysRoleMapper.xml @@ -3,7 +3,6 @@ - @@ -70,7 +69,7 @@ - role_id, code, `name`, description, create_by, update_by, create_time, update_time + role_id, `name`, description, create_by, update_by, create_time, update_time @@ -43,7 +42,7 @@