引入 Velocity 模板引擎,生成代码~

This commit is contained in:
YunaiV
2021-02-01 00:48:19 +08:00
parent 0be7138eef
commit 1bea2ea7f8
9 changed files with 187 additions and 38 deletions

View File

@ -0,0 +1,30 @@
import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import java.util.*;
/**
* ${table.description}
*/
@TableName("${table.tableName}")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ${table.tableName}DO extends BaseDO {
#foreach ($column in $columns)
/**
* ${column.columnComment}
*/
#if(${column.primaryKey} && ${column.javaType} != 'String')
@TableId
#end
#if(${column.primaryKey} && ${column.javaType} == 'String')
@TableId(type = IdType.INPUT)
#end
private ${column.javaType} ${column.javaField};
#end
}