mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 08:25:07 +08:00
完成 do 模板的生成
This commit is contained in:
@ -39,6 +39,9 @@ spring:
|
||||
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
|
||||
fail-on-empty-beans: false # 允许序列化无属性的 Bean
|
||||
|
||||
main:
|
||||
lazy-initialization: true # TODO 芋艿:本地开发环境,可以配置下 lazy 延迟加载
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
yudao:
|
||||
version: 1.0.0
|
||||
@ -79,7 +82,7 @@ apollo:
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 打印日志
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 打印日志
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: auto # 自增 ID
|
||||
|
@ -1,9 +1,14 @@
|
||||
package ${basePackage}.${table.moduleName}.dal.mysql.dataobject.${table.businessName};
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import ${baseDOClassName};
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* ${table.description}
|
||||
* ${table.classComment} DO
|
||||
*
|
||||
* @author ${table.author}
|
||||
*/
|
||||
@TableName("${table.tableName}")
|
||||
@Data
|
||||
@ -12,19 +17,24 @@ import java.util.*;
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ${table.tableName}DO extends BaseDO {
|
||||
public class ${table.className}DO extends BaseDO {
|
||||
|
||||
#foreach ($column in $columns)
|
||||
#if (!${baseDOFields.contains(${column.javaField})})##排除 BaseDO 的字段
|
||||
/**
|
||||
* ${column.columnComment}
|
||||
*/
|
||||
#if(${column.primaryKey} && ${column.javaType} != 'String')
|
||||
#if ($column.dictType != "")##处理枚举值
|
||||
// TODO 枚举 ${column.dictType}
|
||||
#end
|
||||
#if (${column.primaryKey} && ${column.javaType} != 'String')##处理主键 + 非 String 的情况
|
||||
@TableId
|
||||
#end
|
||||
#if(${column.primaryKey} && ${column.javaType} == 'String')
|
||||
#if (${column.primaryKey} && ${column.javaType} == 'String')##处理主键 + String 的情况
|
||||
@TableId(type = IdType.INPUT)
|
||||
#end
|
||||
private ${column.javaType} ${column.javaField};
|
||||
#end
|
||||
#end
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user