Blame view

src/main/resources/codegen/java/dal/do.vm 1019 Bytes
305090b7   YunaiV   1. 完成代码生成的表和字段定义的编辑
1
  package ${basePackage}.${table.moduleName}.dal.dataobject.${table.businessName};
528d2a9b   YunaiV   完成 do 模板的生成
2
  
1bea2ea7   YunaiV   引入 Velocity 模板引擎,...
3
4
  import lombok.*;
  import java.util.*;
13f37ce0   YunaiV   分页 request vo 的编写
5
  import com.baomidou.mybatisplus.annotation.*;
59be930f   YunaiV   添加 serviceImpl.vm...
6
  import ${BaseDOClassName};
1bea2ea7   YunaiV   引入 Velocity 模板引擎,...
7
8
  
  /**
528d2a9b   YunaiV   完成 do 模板的生成
9
10
11
  * ${table.classComment} DO
  *
  * @author ${table.author}
1bea2ea7   YunaiV   引入 Velocity 模板引擎,...
12
13
14
15
16
17
18
19
  */
  @TableName("${table.tableName}")
  @Data
  @EqualsAndHashCode(callSuper = true)
  @ToString(callSuper = true)
  @Builder
  @NoArgsConstructor
  @AllArgsConstructor
528d2a9b   YunaiV   完成 do 模板的生成
20
  public class ${table.className}DO extends BaseDO {
1bea2ea7   YunaiV   引入 Velocity 模板引擎,...
21
22
  
  #foreach ($column in $columns)
528d2a9b   YunaiV   完成 do 模板的生成
23
  #if (!${baseDOFields.contains(${column.javaField})})##排除 BaseDO 的字段
1bea2ea7   YunaiV   引入 Velocity 模板引擎,...
24
25
26
      /**
      * ${column.columnComment}
      */
13f37ce0   YunaiV   分页 request vo 的编写
27
  #if ("$!column.dictType" != "")##处理枚举值
528d2a9b   YunaiV   完成 do 模板的生成
28
29
30
      // TODO 枚举 ${column.dictType}
  #end
  #if (${column.primaryKey} && ${column.javaType} != 'String')##处理主键 + 非 String 的情况
1bea2ea7   YunaiV   引入 Velocity 模板引擎,...
31
32
      @TableId
  #end
528d2a9b   YunaiV   完成 do 模板的生成
33
  #if (${column.primaryKey} && ${column.javaType} == 'String')##处理主键 + String 的情况
1bea2ea7   YunaiV   引入 Velocity 模板引擎,...
34
35
36
37
      @TableId(type = IdType.INPUT)
  #end
      private ${column.javaType} ${column.javaField};
  #end
528d2a9b   YunaiV   完成 do 模板的生成
38
  #end
1bea2ea7   YunaiV   引入 Velocity 模板引擎,...
39
40
  
  }