diff --git a/src/main/resources/modules/SpringBoot/java/config/CacheConfig.java b/src/main/resources/modules/SpringBoot/java/config/CacheConfig.java
index 83ff0355..33c06eee 100644
--- a/src/main/resources/modules/SpringBoot/java/config/CacheConfig.java
+++ b/src/main/resources/modules/SpringBoot/java/config/CacheConfig.java
@@ -18,7 +18,7 @@ public class CacheConfig {
@Bean(name = TOKEN_CACHE)
public EhCacheCacheManager getCacheManager() {
net.sf.ehcache.config.Configuration configuration = new net.sf.ehcache.config.Configuration();
- configuration.setMaxBytesLocalHeap("1G");
+ configuration.setMaxBytesLocalHeap("100M");
configuration.updateCheck(false);
configuration.addDiskStore(new DiskStoreConfiguration().path("java.io.tmpdir"));
CacheManager cacheManager = CacheManager.create(configuration);
diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/Resource.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/Resource.java
index 8704b5d3..7db635c6 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/ent/Resource.java
+++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/Resource.java
@@ -10,7 +10,7 @@ import ${basePackage}.frame.base.BaseEntity;
*
* @author wangbing
* @version 0.0.1
- * @since 2019-12-25
+ * @since 2019-12-26
*/
@SheetName("资源")
public class Resource extends BaseEntity {
@@ -28,23 +28,17 @@ public class Resource extends BaseEntity {
@ColumnDescription("")
private String comment;
/**
- * RESOURCE_TYPE - 资源类型
- */
- @ColumnName("资源类型")
- @ColumnDescription("")
- private String resourceType;
- /**
- * NODE - 是否节点
+ * RESOURCE_MODULE - 资源模块
*/
- @ColumnName("是否节点")
+ @ColumnName("资源模块")
@ColumnDescription("")
- private Boolean node;
+ private String resourceModule;
/**
- * SUP_ID - 上级主键
+ * RESOURCE_TYPE - 资源类型
*/
- @ColumnName("上级主键")
+ @ColumnName("资源类型")
@ColumnDescription("")
- private Long supId;
+ private String resourceType;
/**
* VALID - 是否有效
*/
@@ -68,28 +62,20 @@ public class Resource extends BaseEntity {
this.comment = comment;
}
- public String getResourceType() {
- return this.resourceType;
+ public String getResourceModule() {
+ return this.resourceModule;
}
- public void setResourceType(String resourceType) {
- this.resourceType = resourceType;
- }
-
- public Boolean getNode() {
- return this.node;
- }
-
- public void setNode(Boolean node) {
- this.node = node;
+ public void setResourceModule(String resourceModule) {
+ this.resourceModule = resourceModule;
}
- public Long getSupId() {
- return this.supId;
+ public String getResourceType() {
+ return this.resourceType;
}
- public void setSupId(Long supId) {
- this.supId = supId;
+ public void setResourceType(String resourceType) {
+ this.resourceType = resourceType;
}
public Boolean getValid() {
diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_ResourceMapper.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_ResourceMapper.xml
index 80324c2c..e7a75ffe 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_ResourceMapper.xml
+++ b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_ResourceMapper.xml
@@ -7,16 +7,15 @@
`SYS_RESOURCE`
- `ID`,`VALUE`,`COMMENT`,`RESOURCE_TYPE`,`NODE`,`SUP_ID`,`VALID`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
+ `ID`,`VALUE`,`COMMENT`,`RESOURCE_MODULE`,`RESOURCE_TYPE`,`VALID`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
+
-
-
@@ -39,15 +38,12 @@
AND `COMMENT` = ${r"#"}{request.comment}
+
+ AND `RESOURCE_MODULE` = ${r"#"}{request.resourceModule}
+
AND `RESOURCE_TYPE` = ${r"#"}{request.resourceType}
-
- AND `NODE` = ${r"#"}{request.node}
-
-
- AND `SUP_ID` = ${r"#"}{request.supId}
-
AND `VALID` = ${r"#"}{request.valid}
@@ -76,9 +72,8 @@
${r"#"}{request.id},
${r"#"}{request.value,jdbcType=VARCHAR},
${r"#"}{request.comment,jdbcType=VARCHAR},
+ ${r"#"}{request.resourceModule,jdbcType=VARCHAR},
${r"#"}{request.resourceType,jdbcType=VARCHAR},
- ${r"#"}{request.node,jdbcType=BIT},
- ${r"#"}{request.supId,jdbcType=BIGINT},
${r"#"}{request.valid,jdbcType=BIT},
0,
0,
@@ -101,9 +96,8 @@
${r"#"}{item.id},
${r"#"}{item.value,jdbcType=VARCHAR},
${r"#"}{item.comment,jdbcType=VARCHAR},
+ ${r"#"}{item.resourceModule,jdbcType=VARCHAR},
${r"#"}{item.resourceType,jdbcType=VARCHAR},
- ${r"#"}{item.node,jdbcType=BIT},
- ${r"#"}{item.supId,jdbcType=BIGINT},
${r"#"}{item.valid,jdbcType=BIT},
0,
0,
@@ -129,9 +123,8 @@
SET
`VALUE` = ${r"#"}{request.value,jdbcType=VARCHAR},
`COMMENT` = ${r"#"}{request.comment,jdbcType=VARCHAR},
+ `RESOURCE_MODULE` = ${r"#"}{request.resourceModule,jdbcType=VARCHAR},
`RESOURCE_TYPE` = ${r"#"}{request.resourceType,jdbcType=VARCHAR},
- `NODE` = ${r"#"}{request.node,jdbcType=BIT},
- `SUP_ID` = ${r"#"}{request.supId,jdbcType=BIGINT},
`VALID` = ${r"#"}{request.valid,jdbcType=BIT},
`ROW_VERSION` = `ROW_VERSION` + 1,
`LAST_UPDATE_BY` = ${r"#"}{token.userId},
diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceCreateRequest.java
index b34ef738..d2370118 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceCreateRequest.java
+++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceCreateRequest.java
@@ -11,7 +11,7 @@ import ${basePackage}.frame.validation.Dict;
*
* @author wangbing
* @version 0.0.1
- * @since 2019-12-22
+ * @since 2019-12-26
*/
public class ResourceCreateRequest extends BaseRequest {
@@ -28,6 +28,13 @@ public class ResourceCreateRequest extends BaseRequest {
@Length(min = 0, max = 255, message = "[comment]资源描述长度不合法(0-255)")
private String comment;
+ /**
+ * 资源模块
+ */
+ @NotNull(message = "[resourceModule]资源模块不能为NULL")
+ @Dict(name = "RESOURCE_MODULE")
+ private String resourceModule;
+
/**
* 资源类型
*/
@@ -35,17 +42,6 @@ public class ResourceCreateRequest extends BaseRequest {
@Dict(name = "RESOURCE_TYPE")
private String resourceType;
- /**
- * 是否节点
- */
- @NotNull(message = "[node]是否节点不能为NULL")
- private Boolean node;
-
- /**
- * 上级主键
- */
- private Long supId;
-
/**
* 是否有效
*/
@@ -68,28 +64,20 @@ public class ResourceCreateRequest extends BaseRequest {
this.comment = comment;
}
- public String getResourceType() {
- return this.resourceType;
+ public String getResourceModule() {
+ return this.resourceModule;
}
- public void setResourceType(String resourceType) {
- this.resourceType = resourceType;
- }
-
- public Boolean getNode() {
- return this.node;
- }
-
- public void setNode(Boolean node) {
- this.node = node;
+ public void setResourceModule(String resourceModule) {
+ this.resourceModule = resourceModule;
}
- public Long getSupId() {
- return this.supId;
+ public String getResourceType() {
+ return this.resourceType;
}
- public void setSupId(Long supId) {
- this.supId = supId;
+ public void setResourceType(String resourceType) {
+ this.resourceType = resourceType;
}
public Boolean getValid() {
diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceDeleteRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceDeleteRequest.java
index 7659e6d0..ac760fa8 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceDeleteRequest.java
+++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceDeleteRequest.java
@@ -6,9 +6,9 @@ import javax.validation.constraints.NotNull;
/**
* ResourceDeleteRequest - 资源删除
*
- * @author author
+ * @author wangbing
* @version 0.0.1
- * @since 2017-01-01
+ * @since 2019-12-26
*/
public class ResourceDeleteRequest extends BaseUpdateRequest {
diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceFindRequest.java
index c8c2635b..e9f27c05 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceFindRequest.java
+++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceFindRequest.java
@@ -6,9 +6,9 @@ import ${basePackage}.frame.validation.Dict;
/**
* ResourceRequest - 资源查询
*
- * @author author
+ * @author wangbing
* @version 0.0.1
- * @since 2017-01-01
+ * @since 2019-12-26
*/
public class ResourceFindRequest extends BaseFindRequest {
@@ -22,6 +22,12 @@ public class ResourceFindRequest extends BaseFindRequest {
*/
private String comment;
+ /**
+ * 资源模块
+ */
+ @Dict(name = "RESOURCE_MODULE")
+ private String resourceModule;
+
/**
* 资源类型
*/
@@ -33,16 +39,6 @@ public class ResourceFindRequest extends BaseFindRequest {
*/
private Boolean valid;
- /**
- * 是否节点
- */
- private Boolean node;
-
- /**
- * 上级主键
- */
- private Long supId;
-
public String getValue() {
return this.value;
}
@@ -59,6 +55,14 @@ public class ResourceFindRequest extends BaseFindRequest {
this.comment = comment;
}
+ public String getResourceModule() {
+ return this.resourceModule;
+ }
+
+ public void setResourceModule(String resourceModule) {
+ this.resourceModule = resourceModule;
+ }
+
public String getResourceType() {
return this.resourceType;
}
@@ -74,20 +78,4 @@ public class ResourceFindRequest extends BaseFindRequest {
public void setValid(Boolean valid) {
this.valid = valid;
}
-
- public Boolean getNode() {
- return this.node;
- }
-
- public void setNode(Boolean node) {
- this.node = node;
- }
-
- public Long getSupId() {
- return this.supId;
- }
-
- public void setSupId(Long supId) {
- this.supId = supId;
- }
-}
\ No newline at end of file
+}
diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceGetRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceGetRequest.java
index 6fcbb8e3..80d88753 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceGetRequest.java
+++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceGetRequest.java
@@ -6,9 +6,9 @@ import javax.validation.constraints.NotNull;
/**
* ResourceGetRequest - 资源获取
*
- * @author author
+ * @author wangbing
* @version 0.0.1
- * @since 2017-01-01
+ * @since 2019-12-26
*/
public class ResourceGetRequest extends BaseRequest {
diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceUpdateRequest.java
index 9d30ecc3..0c6570d0 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceUpdateRequest.java
+++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResourceUpdateRequest.java
@@ -11,7 +11,7 @@ import ${basePackage}.frame.validation.Dict;
*
* @author wangbing
* @version 0.0.1
- * @since 2019-12-22
+ * @since 2019-12-26
*/
public class ResourceUpdateRequest extends BaseUpdateRequest {
@@ -34,6 +34,13 @@ public class ResourceUpdateRequest extends BaseUpdateRequest {
@Length(min = 0, max = 255, message = "[comment]资源描述长度不合法(0-255)")
private String comment;
+ /**
+ * 资源模块
+ */
+ @NotNull(message = "[resourceModule]资源模块不能为NULL")
+ @Dict(name = "RESOURCE_MODULE")
+ private String resourceModule;
+
/**
* 资源类型
*/
@@ -41,17 +48,6 @@ public class ResourceUpdateRequest extends BaseUpdateRequest {
@Dict(name = "RESOURCE_TYPE")
private String resourceType;
- /**
- * 是否节点
- */
- @NotNull(message = "[node]是否节点不能为NULL")
- private Boolean node;
-
- /**
- * 上级主键
- */
- private Long supId;
-
/**
* 是否有效
*/
@@ -82,28 +78,20 @@ public class ResourceUpdateRequest extends BaseUpdateRequest {
this.comment = comment;
}
- public String getResourceType() {
- return this.resourceType;
+ public String getResourceModule() {
+ return this.resourceModule;
}
- public void setResourceType(String resourceType) {
- this.resourceType = resourceType;
- }
-
- public Boolean getNode() {
- return this.node;
- }
-
- public void setNode(Boolean node) {
- this.node = node;
+ public void setResourceModule(String resourceModule) {
+ this.resourceModule = resourceModule;
}
- public Long getSupId() {
- return this.supId;
+ public String getResourceType() {
+ return this.resourceType;
}
- public void setSupId(Long supId) {
- this.supId = supId;
+ public void setResourceType(String resourceType) {
+ this.resourceType = resourceType;
}
public Boolean getValid() {
diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_RESOURCE.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_RESOURCE.sql
index 058152e0..7fb89189 100644
--- a/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_RESOURCE.sql
+++ b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_RESOURCE.sql
@@ -2,15 +2,14 @@
-- Table structure for RESOURCE - 资源
-- Target : MySQL
-- Author : wangbing
--- Date: : 2019-12-22
+-- Date: : 2019-12-26
-- ----------------------------
CREATE TABLE `SYS_RESOURCE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
`VALUE` VARCHAR(100) NOT NULL COMMENT '资源内容',
`COMMENT` VARCHAR(250) COMMENT '资源描述',
+ `RESOURCE_MODULE` VARCHAR(20) NOT NULL COMMENT '资源模块',
`RESOURCE_TYPE` VARCHAR(20) NOT NULL COMMENT '资源类型',
- `NODE` TINYINT(1) NOT NULL COMMENT '是否节点',
- `SUP_ID` BIGINT(20) COMMENT '上级主键',
`VALID` TINYINT(1) NOT NULL COMMENT '是否有效',
`ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本',
`IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除',
diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml b/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml
index 6110db90..54ffa101 100644
--- a/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml
+++ b/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml
@@ -4,7 +4,7 @@
xyz.wbsite
wangbing
false
-true
+false
系统
@@ -48,9 +48,8 @@
+
-
-
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/resource.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/resource.ftl
index 831a759e..8913329a 100644
--- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/resource.ftl
+++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/resource.ftl
@@ -7,19 +7,11 @@
-
-
-
-
-
- 是
- 否
-
+
+
-
-
+
+
@@ -42,36 +34,19 @@
导出
-
-
-
- 是
- 否
-
-
-
-
-
-
-
+
-
-
-
-
+
+
+
+
+
-
是
@@ -135,18 +110,13 @@
-
-
+ prop="resourceModule"
+ label="资源模块">
+ prop="resourceType"
+ label="资源类型">
0) {
- console.error(response.errors[0].message)
- } else {
- this.options = response.result;
- }
- }.bind(this))
- }
},
mounted: function () {
this.onFind();
- this.getTree();
},
})