mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
代码生成器,添加自动生成实体类注释功能
This commit is contained in:
parent
73e48c6db0
commit
86b8c47da3
@ -154,6 +154,16 @@ public class Table {
|
||||
return imports.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public String buildRemarks(){
|
||||
if (StringUtil.isBlank(remarks)){
|
||||
return "";
|
||||
}else {
|
||||
StringBuilder sb = new StringBuilder("/**\n")
|
||||
.append(" * ").append(remarks).append("\n")
|
||||
.append(" */");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建 entity 的 Class 名称
|
||||
|
||||
@ -4,7 +4,7 @@ package #(globalConfig.entityPackage);
|
||||
import #(importClass);
|
||||
#end
|
||||
|
||||
|
||||
#(table.buildRemarks())
|
||||
#(table.buildTableAnnotation())
|
||||
public class #(table.buildEntityClassName())#(table.buildExtends())#(table.buildImplements()) {
|
||||
#for(column: table.columns)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user