提交 | 用户 | 时间
|
e7c126
|
1 |
#set ($subTable = $subTables.get($subIndex))##当前表 |
H |
2 |
#set ($subColumns = $subColumnsList.get($subIndex))##当前字段数组 |
|
3 |
package ${basePackage}.module.${subTable.moduleName}.dal.dataobject.${subTable.businessName}; |
|
4 |
|
|
5 |
import lombok.*; |
|
6 |
import java.util.*; |
|
7 |
#foreach ($column in $subColumns) |
|
8 |
#if (${column.javaType} == "BigDecimal") |
|
9 |
import java.math.BigDecimal; |
|
10 |
#end |
|
11 |
#if (${column.javaType} == "LocalDateTime") |
|
12 |
import java.time.LocalDateTime; |
|
13 |
#end |
|
14 |
#end |
|
15 |
import com.baomidou.mybatisplus.annotation.*; |
|
16 |
import ${BaseDOClassName}; |
|
17 |
|
|
18 |
/** |
|
19 |
* ${subTable.classComment} DO |
|
20 |
* |
|
21 |
* @author ${subTable.author} |
|
22 |
*/ |
|
23 |
@TableName("${subTable.tableName.toLowerCase()}") |
|
24 |
@KeySequence("${subTable.tableName.toLowerCase()}_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 |
|
25 |
@Data |
|
26 |
@EqualsAndHashCode(callSuper = true) |
|
27 |
@ToString(callSuper = true) |
|
28 |
@Builder |
|
29 |
@NoArgsConstructor |
|
30 |
@AllArgsConstructor |
|
31 |
public class ${subTable.className}DO extends BaseDO { |
|
32 |
|
|
33 |
#foreach ($column in $subColumns) |
|
34 |
#if (!${baseDOFields.contains(${column.javaField})})##排除 BaseDO 的字段 |
|
35 |
/** |
|
36 |
* ${column.columnComment} |
|
37 |
#if ("$!column.dictType" != "")##处理枚举值 |
|
38 |
* |
|
39 |
* 枚举 {@link TODO ${column.dictType} 对应的类} |
|
40 |
#end |
|
41 |
*/ |
|
42 |
#if (${column.primaryKey})##处理主键 |
|
43 |
@TableId#if (${column.javaType} == 'String')(type = IdType.INPUT)#end |
|
44 |
#end |
|
45 |
private ${column.javaType} ${column.javaField}; |
|
46 |
#end |
|
47 |
#end |
|
48 |
|
|
49 |
} |