b0c25ea9
YunaiV
多模块重构 11:修改代码生成器的实现
|
1
|
package ${basePackage}.module.${table.moduleName}.dal.dataobject.${table.businessName};
|
533cd1d3
YunaiV
再次调整项目结构
|
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import lombok.*;
import java.util.*;
import com.baomidou.mybatisplus.annotation.*;
import ${BaseDOClassName};
/**
* ${table.classComment} DO
*
* @author ${table.author}
*/
@TableName("${table.tableName}")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
|
8e3d7663
YunaiV
多模块重构 11:代码生成器,支持多租户
|
20
|
public class ${table.className}DO extends ${BaseDOClassName_simple} {
|
533cd1d3
YunaiV
再次调整项目结构
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#foreach ($column in $columns)
#if (!${baseDOFields.contains(${column.javaField})})##排除 BaseDO 的字段
/**
* ${column.columnComment}
#if ("$!column.dictType" != "")##处理枚举值
*
* 枚举 {@link TODO ${column.dictType} 对应的类}
#end
*/
#if (${column.primaryKey})##处理主键
@TableId#if (${column.javaType} == 'String')type = IdType.INPUT)#end
#end
private ${column.javaType} ${column.javaField};
#end
#end
}
|