diff --git a/src/main/resources/modules/SpringBoot/java/config/CacheConfig.java b/src/main/resources/modules/SpringBoot/java/config/CacheConfig.java
index e60b86a3..83ff0355 100644
--- a/src/main/resources/modules/SpringBoot/java/config/CacheConfig.java
+++ b/src/main/resources/modules/SpringBoot/java/config/CacheConfig.java
@@ -3,6 +3,7 @@ package ${basePackage}.config;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.config.DiskStoreConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.ehcache.EhCacheCacheManager;
import org.springframework.context.annotation.Bean;
@@ -35,8 +36,8 @@ public class CacheConfig {
private Cache buildTokenCache() {
CacheConfiguration config = new CacheConfiguration();
config.setMemoryStoreEvictionPolicy("LFU");//最少使用
- config.setTimeToLiveSeconds(60);//最长有效时间
- config.setTimeToIdleSeconds(60);//无访问最长有效时间
+ config.setTimeToLiveSeconds(60 * 60);//最长有效时间
+ config.setTimeToIdleSeconds(60 * 60);//无访问最长有效时间
config.setName(TOKEN_CACHE);
return new Cache(config);
}
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 e5c85ba9..8704b5d3 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
@@ -8,9 +8,9 @@ import ${basePackage}.frame.base.BaseEntity;
/**
* RESOURCE - 资源
*
- * @author author
+ * @author wangbing
* @version 0.0.1
- * @since 2017-01-01
+ * @since 2019-12-25
*/
@SheetName("资源")
public class Resource extends BaseEntity {
@@ -33,6 +33,18 @@ public class Resource extends BaseEntity {
@ColumnName("资源类型")
@ColumnDescription("")
private String resourceType;
+ /**
+ * NODE - 是否节点
+ */
+ @ColumnName("是否节点")
+ @ColumnDescription("")
+ private Boolean node;
+ /**
+ * SUP_ID - 上级主键
+ */
+ @ColumnName("上级主键")
+ @ColumnDescription("")
+ private Long supId;
/**
* VALID - 是否有效
*/
@@ -64,6 +76,22 @@ public class Resource extends BaseEntity {
this.resourceType = resourceType;
}
+ 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;
+ }
+
public Boolean getValid() {
return this.valid;
}
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl
index 2a31a6bd..db62c483 100644
--- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl
+++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/mgr.ftl
@@ -1,7 +1,7 @@
<#-- since ${date?string("yyyy-MM-dd")}-->
-
+
<#list fields as item>
<#if item.isQuery>
<#if item.fieldType.javaType() =="Boolean">
@@ -80,7 +80,7 @@
导出
-
+
<#list fields as item>
<#if !item.isSystem>
<#if item.fieldType.javaType() =="Boolean">
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl
index a1bb7c04..600d4736 100644
--- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl
+++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dept.ftl
@@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
-
+
@@ -38,7 +38,7 @@
导出
-
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl
index 0138d9be..9c81c412 100644
--- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl
+++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dict.ftl
@@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
-
+
@@ -29,7 +29,7 @@
导出
-
+
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl
index 12777a72..b29ddbcd 100644
--- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl
+++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/dictItem.ftl
@@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
-
+
@@ -32,7 +32,7 @@
导出
-
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl
index fe39bb85..04336d12 100644
--- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl
+++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/file.ftl
@@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
-
+
@@ -29,7 +29,7 @@
导出
-
+
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 697cab99..c025cb3c 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
@@ -1,6 +1,6 @@
-
+
@@ -8,7 +8,8 @@
-
+
@@ -17,7 +18,8 @@
-
+
@@ -40,25 +42,36 @@
导出
-
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+
-
-
-
-
-
- 是
- 否
-
-
-
-
+
+
+
+
是
@@ -193,8 +206,8 @@
pageNumber: 1,
pageSize: 10,
totalCount: 0,
- sortKey:'CREATE_TIME',
- sortType:'DESC'
+ sortKey: 'CREATE_TIME',
+ sortType: 'DESC'
},
form: {//待提交表单
title: "",
@@ -222,12 +235,25 @@
node: [
{required: true, message: '是否节点不能为空', trigger: 'blur'},
],
- supId: [
- ],
+ supId: [],
valid: [
{required: true, message: '是否有效不能为空', trigger: 'blur'},
],
- }
+ },
+ options: [
+ {
+ value: "111",
+ label: "指南",
+ children: [{
+ value: 'shejiyuanze',
+ label: '设计原则',
+ children: [{
+ value: 'yizhi',
+ label: '一致'
+ }]
+ }]
+ }
+ ]
},
methods: {
onCreate: function () {
@@ -237,9 +263,9 @@
this.form.value = "";
this.form.comment = "";
this.form.resourceType = "";
- this.form.node = "";
+ this.form.node = false;
this.form.supId = "";
- this.form.valid = "";
+ this.form.valid = true;
},
onCommand: function (arg) {
const cmd = arg[0];
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/role.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/role.ftl
index 5653873b..c52aa1fe 100644
--- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/role.ftl
+++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/role.ftl
@@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
-
+
@@ -26,7 +26,7 @@
导出
-
+
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/tokens.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/tokens.ftl
index ba02b17b..e395bde4 100644
--- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/tokens.ftl
+++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/tokens.ftl
@@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
-
+
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl
index 7741f834..018c4dc9 100644
--- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl
+++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/user.ftl
@@ -1,7 +1,7 @@
<#-- since 2017-01-01-->
-
+
@@ -38,7 +38,7 @@
导出
-
+