diff --git a/src/main/resources/modules/SpringBoot/java/module/system/ent/Res.java b/src/main/resources/modules/SpringBoot/java/module/system/ent/Res.java
index 33ffa8b1..77af2e78 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/ent/Res.java
+++ b/src/main/resources/modules/SpringBoot/java/module/system/ent/Res.java
@@ -1,6 +1,7 @@
package ${basePackage}.module.system.ent;
import ${basePackage}.frame.excel.annotation.ColumnDescription;
+import ${basePackage}.frame.excel.annotation.ColumnList;
import ${basePackage}.frame.excel.annotation.ColumnName;
import ${basePackage}.frame.excel.annotation.SheetName;
import ${basePackage}.frame.base.BaseEntity;
@@ -51,11 +52,19 @@ public class Res extends BaseEntity {
@ColumnName("上级名称")
@ColumnDescription("")
private String supName;
+ /**
+ * FREE - 是否免费
+ */
+ @ColumnName("是否免费")
+ @ColumnDescription("")
+ @ColumnList({"是","否"})
+ private Boolean free;
/**
* VALID - 是否有效
*/
@ColumnName("是否有效")
@ColumnDescription("")
+ @ColumnList({"是","否"})
private Boolean valid;
public String getResCode() {
@@ -106,6 +115,14 @@ public class Res extends BaseEntity {
this.supName = supName;
}
+ public Boolean getFree() {
+ return this.free;
+ }
+
+ public void setFree(Boolean free) {
+ this.free = free;
+ }
+
public Boolean getValid() {
return this.valid;
}
diff --git a/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_ResMapper.xml b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_ResMapper.xml
index 9ea64309..bdc1a52c 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_ResMapper.xml
+++ b/src/main/resources/modules/SpringBoot/java/module/system/mpr/MySQL_ResMapper.xml
@@ -10,7 +10,7 @@
`SYS_RES`
- `ID`,`RES_CODE`,`RES_NAME`,`RES_TYPE`,`RES_VALUE`,`SUP_CODE`,`SUP_NAME`,`VALID`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
+ `ID`,`RES_CODE`,`RES_NAME`,`RES_TYPE`,`RES_VALUE`,`SUP_CODE`,`SUP_NAME`,`FREE`,`VALID`,`ROW_VERSION`,`IS_DELETED`,`CREATE_BY`,`CREATE_TIME`,`LAST_UPDATE_BY`,`LAST_UPDATE_TIME`
@@ -21,6 +21,7 @@
+
@@ -55,6 +56,9 @@
AND `SUP_NAME` = ${r'#'}{request.supName}
+
+ AND `FREE` = ${r'#'}{request.free}
+
AND `VALID` = ${r'#'}{request.valid}
@@ -105,6 +109,7 @@
${r'#'}{request.resValue,jdbcType=VARCHAR},
${r'#'}{request.supCode,jdbcType=VARCHAR},
${r'#'}{request.supName,jdbcType=VARCHAR},
+ ${r'#'}{request.free,jdbcType=BIT},
${r'#'}{request.valid,jdbcType=BIT},
0,
0,
@@ -131,6 +136,7 @@
${r'#'}{item.resValue,jdbcType=VARCHAR},
${r'#'}{item.supCode,jdbcType=VARCHAR},
${r'#'}{item.supName,jdbcType=VARCHAR},
+ ${r'#'}{item.free,jdbcType=BIT},
${r'#'}{item.valid,jdbcType=BIT},
0,
0,
@@ -160,6 +166,7 @@
`RES_VALUE` = ${r'#'}{request.resValue,jdbcType=VARCHAR},
`SUP_CODE` = ${r'#'}{request.supCode,jdbcType=VARCHAR},
`SUP_NAME` = ${r'#'}{request.supName,jdbcType=VARCHAR},
+ `FREE` = ${r'#'}{request.free,jdbcType=BIT},
`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/ResCreateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResCreateRequest.java
index d82fa654..b92d1f54 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResCreateRequest.java
+++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResCreateRequest.java
@@ -42,6 +42,11 @@ public class ResCreateRequest extends BaseRequest {
@Length(min = 0, max = 255, message = "[resValue]资源内容长度不合法(0-255)")
private String resValue;
+ /**
+ * 是否免费
+ */
+ private Boolean free;
+
/**
* 是否有效
*/
@@ -80,6 +85,14 @@ public class ResCreateRequest extends BaseRequest {
this.resValue = resValue;
}
+ public Boolean getFree() {
+ return this.free;
+ }
+
+ public void setFree(Boolean free) {
+ this.free = free;
+ }
+
public Boolean getValid() {
return this.valid;
}
diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResFindRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResFindRequest.java
index d5355016..08e431a5 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResFindRequest.java
+++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResFindRequest.java
@@ -43,6 +43,11 @@ public class ResFindRequest extends BaseFindRequest {
*/
private String supName;
+ /**
+ * 是否免费
+ */
+ private Boolean free;
+
/**
* 是否有效
*/
@@ -106,6 +111,14 @@ public class ResFindRequest extends BaseFindRequest {
this.supName = supName;
}
+ public Boolean getFree() {
+ return this.free;
+ }
+
+ public void setFree(Boolean free) {
+ this.free = free;
+ }
+
public Boolean getValid() {
return this.valid;
}
diff --git a/src/main/resources/modules/SpringBoot/java/module/system/req/ResUpdateRequest.java b/src/main/resources/modules/SpringBoot/java/module/system/req/ResUpdateRequest.java
index f911c908..0940ca3d 100644
--- a/src/main/resources/modules/SpringBoot/java/module/system/req/ResUpdateRequest.java
+++ b/src/main/resources/modules/SpringBoot/java/module/system/req/ResUpdateRequest.java
@@ -60,6 +60,11 @@ public class ResUpdateRequest extends BaseUpdateRequest {
@Length(min = 0, max = 50, message = "[supName]上级名称长度不合法(0-50)")
private String supName;
+ /**
+ * 是否免费
+ */
+ private Boolean free;
+
/**
* 是否有效
*/
@@ -122,6 +127,14 @@ public class ResUpdateRequest extends BaseUpdateRequest {
this.supName = supName;
}
+ public Boolean getFree() {
+ return this.free;
+ }
+
+ public void setFree(Boolean free) {
+ this.free = free;
+ }
+
public Boolean getValid() {
return this.valid;
}
@@ -130,4 +143,3 @@ public class ResUpdateRequest extends BaseUpdateRequest {
this.valid = valid;
}
}
-
diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_ALL_TABLE.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_ALL_TABLE.sql
index 6d2ac0fa..4b05a01a 100644
--- a/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_ALL_TABLE.sql
+++ b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_ALL_TABLE.sql
@@ -2,7 +2,7 @@
-- Table structure for DICT - 字典
-- Target : MySQL
-- Author : wangbing
--- Date: : 2020-01-08
+-- Date: : 2020-05-15
-- ----------------------------
CREATE TABLE `SYS_DICT` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
@@ -23,7 +23,7 @@ PRIMARY KEY (`ID`)
-- Table structure for DICT_ITEM - 字典项
-- Target : MySQL
-- Author : wangbing
--- Date: : 2020-01-08
+-- Date: : 2020-05-15
-- ----------------------------
CREATE TABLE `SYS_DICT_ITEM` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
@@ -45,7 +45,7 @@ PRIMARY KEY (`ID`)
-- Table structure for RES - 资源
-- Target : MySQL
-- Author : wangbing
--- Date: : 2020-01-08
+-- Date: : 2020-05-15
-- ----------------------------
CREATE TABLE `SYS_RES` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
@@ -55,6 +55,7 @@ CREATE TABLE `SYS_RES` (
`RES_VALUE` VARCHAR(250) COMMENT '资源内容',
`SUP_CODE` VARCHAR(50) COMMENT '上级代码',
`SUP_NAME` VARCHAR(50) COMMENT '上级名称',
+ `FREE` TINYINT(1) 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 '是否已删除',
@@ -69,7 +70,7 @@ PRIMARY KEY (`ID`)
-- Table structure for USER - 用户
-- Target : MySQL
-- Author : wangbing
--- Date: : 2020-01-08
+-- Date: : 2020-05-15
-- ----------------------------
CREATE TABLE `SYS_USER` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
@@ -94,7 +95,7 @@ PRIMARY KEY (`ID`)
-- Table structure for DEPT - 部门
-- Target : MySQL
-- Author : wangbing
--- Date: : 2020-01-08
+-- Date: : 2020-05-15
-- ----------------------------
CREATE TABLE `SYS_DEPT` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
@@ -117,7 +118,7 @@ PRIMARY KEY (`ID`)
-- Table structure for ROLE - 角色
-- Target : MySQL
-- Author : wangbing
--- Date: : 2020-01-08
+-- Date: : 2020-05-15
-- ----------------------------
CREATE TABLE `SYS_ROLE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
@@ -137,7 +138,7 @@ PRIMARY KEY (`ID`)
-- Table structure for TOKENS - 通行证
-- Target : MySQL
-- Author : wangbing
--- Date: : 2020-01-08
+-- Date: : 2020-05-15
-- ----------------------------
CREATE TABLE `SYS_TOKENS` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
@@ -166,7 +167,7 @@ PRIMARY KEY (`ID`)
-- Table structure for FILE - 文件
-- Target : MySQL
-- Author : wangbing
--- Date: : 2020-01-08
+-- Date: : 2020-05-15
-- ----------------------------
CREATE TABLE `SYS_FILE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
@@ -190,7 +191,7 @@ PRIMARY KEY (`ID`)
-- Table structure for USER_ROLE - 用户角色授权
-- Target : MySQL
-- Author : wangbing
--- Date: : 2020-01-08
+-- Date: : 2020-05-15
-- ----------------------------
CREATE TABLE `SYS_USER_ROLE` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
@@ -211,7 +212,7 @@ PRIMARY KEY (`ID`)
-- Table structure for ROLE_RES - 角色资源关系
-- Target : MySQL
-- Author : wangbing
--- Date: : 2020-01-08
+-- Date: : 2020-05-15
-- ----------------------------
CREATE TABLE `SYS_ROLE_RES` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
@@ -228,3 +229,27 @@ CREATE TABLE `SYS_ROLE_RES` (
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色资源关系';
+-- ----------------------------
+-- Table structure for LOG_ERR - 错误日志
+-- Target : MySQL
+-- Author : wangbing
+-- Date: : 2020-05-15
+-- ----------------------------
+CREATE TABLE `SYS_LOG_ERR` (
+ `ID` BIGINT(20) NOT NULL COMMENT '主键',
+ `LOG_ERR_TYPE` VARCHAR(20) COMMENT '错误类型',
+ `TITLE` VARCHAR(50) NOT NULL COMMENT '错误标题',
+ `CONTENT` TEXT COMMENT '错误内容',
+ `LOG_ERR_RESULT` VARCHAR(20) NOT NULL COMMENT '处理结果',
+ `ATTRIBUTE1` VARCHAR(50) COMMENT '属性1',
+ `ATTRIBUTE2` VARCHAR(50) COMMENT '属性2',
+ `ATTRIBUTE3` VARCHAR(50) COMMENT '属性3',
+ `ROW_VERSION` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '行版本',
+ `IS_DELETED` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已删除',
+ `CREATE_BY` BIGINT(20) NOT NULL COMMENT '创建用户',
+ `CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
+ `LAST_UPDATE_BY` BIGINT(20) DEFAULT NULL COMMENT '最后更新用户',
+ `LAST_UPDATE_TIME` DATETIME DEFAULT NULL COMMENT '最后更新时间',
+PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='错误日志';
+
diff --git a/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_RES.sql b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_RES.sql
index 0d7d9897..53b7853d 100644
--- a/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_RES.sql
+++ b/src/main/resources/modules/SpringBoot/resources/dbtool/system/MySQL_RES.sql
@@ -2,7 +2,7 @@
-- Table structure for RES - 资源
-- Target : MySQL
-- Author : wangbing
--- Date: : 2020-01-05
+-- Date: : 2020-05-15
-- ----------------------------
CREATE TABLE `SYS_RES` (
`ID` BIGINT(20) NOT NULL COMMENT '主键',
@@ -12,6 +12,7 @@ CREATE TABLE `SYS_RES` (
`RES_VALUE` VARCHAR(250) COMMENT '资源内容',
`SUP_CODE` VARCHAR(50) COMMENT '上级代码',
`SUP_NAME` VARCHAR(50) COMMENT '上级名称',
+ `FREE` TINYINT(1) 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 af14ee3f..3eec07bd 100644
--- a/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml
+++ b/src/main/resources/modules/SpringBoot/resources/dbtool/wadmin.xml
@@ -3,14 +3,18 @@
wadmin
xyz.wbsite
wangbing
-false
-false
+false
+false
+false
+false
+false
+MySQL
系统
SYS_
system
-true
+
@@ -52,12 +56,13 @@
+
-
+
-
+
diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/res.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/res.ftl
index b00d04cc..0dfaced9 100644
--- a/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/res.ftl
+++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/module/system/res.ftl
@@ -18,6 +18,12 @@
+
+
+ 是
+ 否
+
+
是
@@ -109,6 +115,15 @@
width="200"
label="资源内容">
+
+
+ 免费
+ 授权
+
+
+
+
+
是
@@ -243,6 +261,7 @@
resName: "",
resType: "",
resValue: "",
+ free: "",
valid: "",
pageNumber: 1,
pageSize: 10,
@@ -258,6 +277,7 @@
resName: "",
resType: "",
resValue: "",
+ free: "",
valid: "",
rowVersion: ""
},
@@ -276,6 +296,9 @@
resValue: [
{min: 1, max: 255, message: '资源内容长度在 1 到 255 个字符', trigger: 'blur'}
],
+ free: [
+ {required: true, message: '是否免费不能为空', trigger: 'blur'},
+ ],
valid: [
{required: true, message: '是否有效不能为空', trigger: 'blur'},
],
@@ -292,6 +315,7 @@
this.form.resName = "";
this.form.resType = "";
this.form.resValue = "";
+ this.form.free = false;
this.form.valid = true;
},
onEdit: function (item) {
@@ -302,6 +326,7 @@
this.form.resName = item.resName;
this.form.resType = item.resType;
this.form.resValue = item.resValue;
+ this.form.free = item.free;
this.form.valid = item.valid;
this.form.rowVersion = item.rowVersion;
},
@@ -331,6 +356,7 @@
this.form.resName = "";
this.form.resType = "";
this.form.resValue = "";
+ this.form.free = false;
this.form.valid = true;
},
onTreeEdit: function (pItem) {
@@ -341,6 +367,7 @@
this.form.resName = pItem.resName;
this.form.resType = pItem.resType;
this.form.resValue = pItem.resValue;
+ this.form.free = pItem.free;
this.form.valid = pItem.valid;
this.form.rowVersion = pItem.rowVersion;
},