File tree 6 files changed +18
-1
lines changed
java/tk/mybatis/mapper/generator
6 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,7 @@ ${key} - ${props[key]}
254
254
255
255
实体和表的信息:
256
256
表名:${tableClass.tableName}
257
+ 表注释:${tableClass.remarks}
257
258
变量名:${tableClass.variableName}
258
259
小写名:${tableClass.lowerCaseName}
259
260
类名:${tableClass.shortClassName}
@@ -411,6 +412,7 @@ fileName - ${tableClass.shortClassName}Test.txt
411
412
412
413
实体和表的信息:
413
414
表名:user_info
415
+ 表注释:用户信息表
414
416
变量名:userInfo
415
417
小写名:userinfo
416
418
类名:UserInfo
Original file line number Diff line number Diff line change @@ -130,8 +130,11 @@ protected String read(InputStream inputStream) throws IOException {
130
130
StringBuffer stringBuffer = new StringBuffer ();
131
131
String line = reader .readLine ();
132
132
while (line != null ) {
133
- stringBuffer .append (line ). append ( " \n " ) ;
133
+ stringBuffer .append (line );
134
134
line = reader .readLine ();
135
+ if (line != null ) {
136
+ stringBuffer .append ("\n " );
137
+ }
135
138
}
136
139
return stringBuffer .toString ();
137
140
}
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ public class TableClass implements Serializable {
46
46
private String fullClassName ;
47
47
private String packageName ;
48
48
private FullyQualifiedJavaType type ;
49
+ private String remarks ;
49
50
50
51
private List <ColumnField > pkFields ;
51
52
private List <ColumnField > baseFields ;
@@ -147,4 +148,12 @@ public String getVariableName() {
147
148
public void setVariableName (String variableName ) {
148
149
this .variableName = variableName ;
149
150
}
151
+
152
+ public String getRemarks () {
153
+ return remarks ;
154
+ }
155
+
156
+ public void setRemarks (String remarks ) {
157
+ this .remarks = remarks ;
158
+ }
150
159
}
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ public class TableColumnBuilder {
48
48
public static TableClass build (IntrospectedTable introspectedTable ) {
49
49
TableClass tableClass = new TableClass ();
50
50
tableClass .setIntrospectedTable (introspectedTable );
51
+ tableClass .setRemarks (introspectedTable .getRemarks ());
51
52
52
53
FullyQualifiedTable fullyQualifiedTable = introspectedTable .getFullyQualifiedTable ();
53
54
tableClass .setTableName (fullyQualifiedTable .getIntrospectedTableName ());
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ ${dateTime?string["yyyy-MM-dd HH:mm:ss"]}
16
16
****************************************************************************************
17
17
实体和表的信息:
18
18
表名:${tableClass.tableName}
19
+ 表注释:${tableClass.remarks}
19
20
变量名:${tableClass.variableName}
20
21
小写名:${tableClass.lowerCaseName}
21
22
类名:${tableClass.shortClassName}
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ ${dateTime?string["yyyy-MM-dd HH:mm:ss"]}
13
13
14
14
实体和表的信息:
15
15
表名:${tableClass.tableName}
16
+ 表注释:${tableClass.remarks}
16
17
变量名:${tableClass.variableName}
17
18
小写名:${tableClass.lowerCaseName}
18
19
类名:${tableClass.shortClassName}
You can’t perform that action at this time.
0 commit comments