Blame view

src/main/resources/codegen/java/dal/do.vm 939 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
  
  /**
eb3d0386   YunaiV   代码生成器,增加 excel 导出功能
9
10
11
12
   * ${table.classComment} DO
   *
   * @author ${table.author}
   */
1bea2ea7   YunaiV   引入 Velocity 模板引擎,...
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
      /**
392dfa47   YunaiV   代码生成器,增加 business...
25
26
27
28
29
30
31
32
33
       * ${column.columnComment}
      #if ("$!column.dictType" != "")##处理枚举值
       *
       * 枚举 {@link TODO ${column.dictType} 对应的类}
      #end
       */
      #if (${column.primaryKey})##处理主键
      @TableId#if (${column.javaType} == 'String')type = IdType.INPUT)#end
      #end
1bea2ea7   YunaiV   引入 Velocity 模板引擎,...
34
35
      private ${column.javaType} ${column.javaField};
  #end
528d2a9b   YunaiV   完成 do 模板的生成
36
  #end
1bea2ea7   YunaiV   引入 Velocity 模板引擎,...
37
38
  
  }