diff --git a/admin-console/pom.xml b/admin-console/pom.xml index cab43af4e485b3065af385bdc0f2d92162431b56..e7400fd8efa612f9ef166a9f6053057a8eb62b7a 100644 --- a/admin-console/pom.xml +++ b/admin-console/pom.xml @@ -8,7 +8,7 @@ com.ibeetl admin - 1.1 + 1.1.1 @@ -20,6 +20,20 @@ + + + + org.springframework.boot + spring-boot-maven-plugin + + true + 1.8 + 1.8 + boot + + + + diff --git a/admin-console/src/main/resources/application.properties b/admin-console/src/main/resources/application.properties index 62bca8ed48c1a598d88fc06ed7eae899e2c17366..7ddf417e9f4fda34b79a9e80bd42c11d37889a0a 100644 --- a/admin-console/src/main/resources/application.properties +++ b/admin-console/src/main/resources/application.properties @@ -1,6 +1,6 @@ spring.datasource.url=jdbc:mysql://127.0.0.1:3306/starter?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false spring.datasource.username=root -spring.datasource.password=123456 +spring.datasource.password=root spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver #spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl diff --git a/admin-core/pom.xml b/admin-core/pom.xml index 3189804ba8310b9264af72170f4e5969430a2552..7c10a0b10f813483449b788bc1034e971de59591 100644 --- a/admin-core/pom.xml +++ b/admin-core/pom.xml @@ -57,9 +57,23 @@ poi-ooxml 3.17 - - + + + + + org.springframework.boot + spring-boot-maven-plugin + + true + 1.8 + 1.8 + boot + + + + + com.ibeetl admin diff --git a/admin-core/src/main/java/com/ibeetl/admin/core/web/CoreCodeGenController.java b/admin-core/src/main/java/com/ibeetl/admin/core/web/CoreCodeGenController.java index 58448726293fd90af4b10c158628a9deab5cd85b..3463e06bd870d88173774e8f9a1efdee31de15c2 100644 --- a/admin-core/src/main/java/com/ibeetl/admin/core/web/CoreCodeGenController.java +++ b/admin-core/src/main/java/com/ibeetl/admin/core/web/CoreCodeGenController.java @@ -70,7 +70,7 @@ public class CoreCodeGenController { String root = file.getParent(); //设置生成项目为当前运行项目的上一级项目 view.addObject("path",root+File.separator+"sample"); - view.addObject("basePackage","com.corp.xxx"); + view.addObject("basePackage","cn.wlyoa.dnjd"); return view; } diff --git a/admin-core/src/main/resources/codeTemplate/html/add.html b/admin-core/src/main/resources/codeTemplate/html/add.html index 5adec5d1f9f13828efe1e9f896a20c3245e3b3a8..bb9a5d39c147e638380efd39c7e5c00ff38f0401 100644 --- a/admin-core/src/main/resources/codeTemplate/html/add.html +++ b/admin-core/src/main/resources/codeTemplate/html/add.html @@ -12,17 +12,20 @@
@for(item in array){ @if(item==null){continue;} - + @if(item.name=="delFlag"){continue;} + @if(item.name=="version"){continue;} + @if(item.name=="attachmentId"){continue;} +
- -
- @if(isEmpty(item.dictType)){ - - @}else{ - - @} -
+ +
+ @if(isEmpty(item.dictType)){ + + @}else{ + + @} +
@} diff --git a/admin-core/src/main/resources/codeTemplate/html/edit.html b/admin-core/src/main/resources/codeTemplate/html/edit.html index b1b981072680b89af668ec8170567fa036e59e32..37c5ae628ae04bfd8cf82fb16d1172f611572935 100644 --- a/admin-core/src/main/resources/codeTemplate/html/edit.html +++ b/admin-core/src/main/resources/codeTemplate/html/edit.html @@ -4,24 +4,27 @@ @ var list = entity.generalList; @ var size = list.~size; /*一行显示俩个,生成后在根据显示要求调整*/ @ for(var i=0;i
@for(item in array){ - @if(item==null){continue;} + @if(item==null){continue;} + @if(item.name=="delFlag"){continue;} + @if(item.name=="version"){continue;} + @if(item.name=="attachmentId"){continue;}
- -
- @if(isEmpty(item.dictType)){ - - @}else{ - - @} -
+ +
+ @if(isEmpty(item.dictType)){ + + @}else{ + + @} +
@}
@@ -33,6 +36,13 @@
@} + + @for(item in list){ + @if(item==null){continue;} + @if((item.name=="delFlag")||(item.name=="version")){ + + @} + @} diff --git a/admin-core/src/main/resources/codeTemplate/java/pojo.java b/admin-core/src/main/resources/codeTemplate/java/pojo.java index e7c51b8295eb93334c8e72c2452f253f6c24287b..db93ccefe9530f6f5ab401737cfe67a780b99b54 100644 --- a/admin-core/src/main/resources/codeTemplate/java/pojo.java +++ b/admin-core/src/main/resources/codeTemplate/java/pojo.java @@ -6,8 +6,8 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Null; -import org.beetl.sql.core.annotatoin.AutoID; -import org.beetl.sql.core.annotatoin.SeqID; +import com.ibeetl.admin.core.util.enums.DelFlagEnum; +import org.beetl.sql.core.annotatoin.*; import com.ibeetl.admin.core.util.ValidateConfig; @@ -32,10 +32,17 @@ public class ${className} extends BaseEntity{ \@SeqID(name = ORACLE_CORE_SEQ_NAME) \@AutoID @} - @if(isNotEmpty(attr.dictType)) { \@Dict(type="${attr.dictType}") @} + @if(attr.name == "delFlag") { + \@InsertIgnore + \@LogicDelete(value = 1) + @} + @if(attr.name == "version") { + \@InsertIgnore + \@Version + @} private ${attr.type} ${attr.name} ; @} diff --git a/admin-core/src/main/resources/codeTemplate/js/index.js b/admin-core/src/main/resources/codeTemplate/js/index.js index 18c9f15b3449ae7768a706d3d6f620691fb53554..7dbb5e874f73598675eacd9b859416fc61613945 100644 --- a/admin-core/src/main/resources/codeTemplate/js/index.js +++ b/admin-core/src/main/resources/codeTemplate/js/index.js @@ -16,29 +16,34 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) { ${entity.code}Table = table.render({ elem : '#${entity.code}Table', height : Lib.getTableHeight(1), + cellMinWidth: 100, method : 'post', url : Common.ctxPath + '/${target.urlBase}/${entity.code}/list.json' // 数据接口 ,page : Lib.tablePage // 开启分页 ,limit : 10, cols : [ [ // 表头 { - type : 'checkbox', - fixed:'left', + type : 'checkbox', + fixed:'left', }, @for(attr in entity.list){ + @if(attr.name=="delFlag"){continue;} + @if(attr.name=="version"){continue;} + @if(attr.name=="attachmentId"){continue;} { - field : '${isEmpty(attr.dictType)?attr.name:(attr.name+"Text")}', ${isNotEmpty(attr.dictType)?"//数据字典类型为 "+attr.dictType} - title : '${attr.displayName}', - @if(attrLP.first){ - fixed:'left', - @} - @if(attr.javaType=="date"){ - templet:function(d){ - return Common.getDate(d.${attr.name}); - }, - @} - width : 100 - }${!attrLP.last?","} + + field : '${isEmpty(attr.dictType)?attr.name:(attr.name+"Text")}', ${isNotEmpty(attr.dictType)?"//数据字典类型为 "+attr.dictType} + title : '${attr.displayName}', + @if(attrLP.first){ + fixed:'left', + width : 60, + @} + @if(attr.javaType=="date"){ + templet:function(d){ + return Common.getDate(d.${attr.name}); + } + @} + }${!attrLP.last?","} @} ] ] diff --git a/admin-core/src/main/resources/codeTemplate/maven/pomTemplate.xml b/admin-core/src/main/resources/codeTemplate/maven/pomTemplate.xml index e9639706cbcb1737b6a23dadefc7f6ad1c7c8e47..9fb0e2850e90197b9dad9d672e06f17f0f5c4f81 100644 --- a/admin-core/src/main/resources/codeTemplate/maven/pomTemplate.xml +++ b/admin-core/src/main/resources/codeTemplate/maven/pomTemplate.xml @@ -61,17 +61,30 @@ com.ibeetl admin-core - 1.0 + 1.1.1 com.ibeetl admin-console - 1.0 + 1.1.1 - + + + + org.springframework.boot + spring-boot-maven-plugin + + true + 1.8 + 1.8 + boot + + + + diff --git a/admin-core/src/main/resources/codeTemplate/md/entity.md b/admin-core/src/main/resources/codeTemplate/md/entity.md index 252a897b7a20b9ad73249be2ff5d2a18d4accdc5..777a5aa41dd95eec4b1084c09f69fc496a3e1abc 100644 --- a/admin-core/src/main/resources/codeTemplate/md/entity.md +++ b/admin-core/src/main/resources/codeTemplate/md/entity.md @@ -7,7 +7,7 @@ queryByCondition t.* \@} from ${entity.tableName} t - where 1=1 + where del_flag=0 \@//数据权限,该sql语句功能点 and #function("${entity.code}.query")# @for(attr in entity.list){ diff --git a/admin-core/src/main/resources/templates/core/codeGen/edit.html b/admin-core/src/main/resources/templates/core/codeGen/edit.html index d1ddaba8b92a59ac65b6dedca70d8732c46e6bd5..25d4d577bf087a2a36ab543f35cd606af03ecd10 100644 --- a/admin-core/src/main/resources/templates/core/codeGen/edit.html +++ b/admin-core/src/main/resources/templates/core/codeGen/edit.html @@ -72,7 +72,7 @@
+ value="cn.wlyoa.dnjd" class="layui-input">
@@ -102,14 +102,14 @@
- +
-