diff --git a/generator-web/src/main/java/com/softdev/system/generator/util/TableParseUtil.java b/generator-web/src/main/java/com/softdev/system/generator/util/TableParseUtil.java index 418c206..abd56c9 100644 --- a/generator-web/src/main/java/com/softdev/system/generator/util/TableParseUtil.java +++ b/generator-web/src/main/java/com/softdev/system/generator/util/TableParseUtil.java @@ -59,7 +59,13 @@ public class TableParseUtil { } if (classCommentTmp!=null && classCommentTmp.trim().length()>0) { classComment = classCommentTmp; + }else{ + //修复表备注为空问题 + classComment = className; } + }else{ + //修复表备注为空问题 + classComment = className; } // field List @@ -124,6 +130,9 @@ public class TableParseUtil { commentTmp = commentTmp.substring(commentTmp.indexOf("'")+1, commentTmp.lastIndexOf("'")); } fieldComment = commentTmp; + }else{ + //修复comment不存在导致报错的问题 + fieldComment = columnName; } FieldInfo fieldInfo = new FieldInfo(); diff --git a/generator-web/src/main/resources/templates/xxl-code-generator/controller.ftl b/generator-web/src/main/resources/templates/xxl-code-generator/controller.ftl index 6cb3997..56e2aba 100644 --- a/generator-web/src/main/resources/templates/xxl-code-generator/controller.ftl +++ b/generator-web/src/main/resources/templates/xxl-code-generator/controller.ftl @@ -11,7 +11,7 @@ import java.util.Map; /** * ${classInfo.classComment} * -* Created by xuxueli on '${.now?string('yyyy-MM-dd HH:mm:ss')}'. +* Created by by-health on '${.now?string('yyyy-MM-dd HH:mm:ss')}'. */ @Controller public class ConfController { diff --git a/generator-web/src/main/resources/templates/xxl-code-generator/dao.ftl b/generator-web/src/main/resources/templates/xxl-code-generator/dao.ftl index ea69f2d..8beb61c 100644 --- a/generator-web/src/main/resources/templates/xxl-code-generator/dao.ftl +++ b/generator-web/src/main/resources/templates/xxl-code-generator/dao.ftl @@ -6,7 +6,7 @@ import java.util.List; /** * ${classInfo.classComment} * -* Created by xuxueli on '${.now?string('yyyy-MM-dd HH:mm:ss')}'. +* Created by by-health on '${.now?string('yyyy-MM-dd HH:mm:ss')}'. */ @Component public interface ${classInfo.className}Dao { diff --git a/generator-web/src/main/resources/templates/xxl-code-generator/entity.ftl b/generator-web/src/main/resources/templates/xxl-code-generator/entity.ftl index 9313198..1146344 100644 --- a/generator-web/src/main/resources/templates/xxl-code-generator/entity.ftl +++ b/generator-web/src/main/resources/templates/xxl-code-generator/entity.ftl @@ -21,7 +21,7 @@ import java.util.Date; @Data @Table(name="${classInfo.tableName}") public class ${classInfo.className} implements Serializable { - private static final long serialVersionUID = 42L; + private static final long serialVersionUID = 1L; <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> <#list classInfo.fieldList as fieldItem > diff --git a/generator-web/src/main/resources/templates/xxl-code-generator/model.ftl b/generator-web/src/main/resources/templates/xxl-code-generator/model.ftl index 590a684..ac73a3d 100644 --- a/generator-web/src/main/resources/templates/xxl-code-generator/model.ftl +++ b/generator-web/src/main/resources/templates/xxl-code-generator/model.ftl @@ -13,7 +13,7 @@ import java.util.Date; /** * ${classInfo.classComment} * -* Created by xuxueli on '${.now?string('yyyy-MM-dd HH:mm:ss')}'. +* Created by by-health on '${.now?string('yyyy-MM-dd HH:mm:ss')}'. */ public class ${classInfo.className} implements Serializable { private static final long serialVersionUID = 42L; diff --git a/generator-web/src/main/resources/templates/xxl-code-generator/service.ftl b/generator-web/src/main/resources/templates/xxl-code-generator/service.ftl index 2addd7e..7435347 100644 --- a/generator-web/src/main/resources/templates/xxl-code-generator/service.ftl +++ b/generator-web/src/main/resources/templates/xxl-code-generator/service.ftl @@ -3,7 +3,7 @@ import java.util.Map; /** * ${classInfo.classComment} * -* Created by xuxueli on '${.now?string('yyyy-MM-dd HH:mm:ss')}'. +* Created by by-health on '${.now?string('yyyy-MM-dd HH:mm:ss')}'. */ public interface ${classInfo.className}Service { diff --git a/generator-web/src/main/resources/templates/xxl-code-generator/service_impl.ftl b/generator-web/src/main/resources/templates/xxl-code-generator/service_impl.ftl index 42cd56f..353ac02 100644 --- a/generator-web/src/main/resources/templates/xxl-code-generator/service_impl.ftl +++ b/generator-web/src/main/resources/templates/xxl-code-generator/service_impl.ftl @@ -9,7 +9,7 @@ import java.util.Map; /** * ${classInfo.classComment} * -* Created by xuxueli on '${.now?string('yyyy-MM-dd HH:mm:ss')}'. +* Created by by-health on '${.now?string('yyyy-MM-dd HH:mm:ss')}'. */ @Service public class ${classInfo.className}ServiceImpl implements ${classInfo.className}Service {