From e3165520cedc692ce5c5b7ccbe815da7182f9eec Mon Sep 17 00:00:00 2001
From: luoyb <412940104@qq.com>
Date: 星期日, 24 一月 2021 21:05:37 +0800
Subject: [PATCH] feat(代码生成微服务、人力资源微服务): 代码生成模板调整及增加人力资源微服务
---
febs-server/febs-server-generator/src/main/resources/generator/templates/entity.ftl | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/febs-server/febs-server-generator/src/main/resources/generator/templates/entity.ftl b/febs-server/febs-server-generator/src/main/resources/generator/templates/entity.ftl
index 62bdde2..0f0ee7f 100644
--- a/febs-server/febs-server-generator/src/main/resources/generator/templates/entity.ftl
+++ b/febs-server/febs-server-generator/src/main/resources/generator/templates/entity.ftl
@@ -1,10 +1,10 @@
package ${basePackage}.${entityPackage};
<#if hasDate = true>
-import java.util.Date;
+ import java.util.Date;
</#if>
<#if hasBigDecimal = true>
-import java.math.BigDecimal;
+ import java.math.BigDecimal;
</#if>
import lombok.Data;
import com.baomidou.mybatisplus.annotation.IdType;
@@ -13,10 +13,14 @@
import com.baomidou.mybatisplus.annotation.TableName;
/**
-* ${tableComment} Entity
+*
+* name:${className}
+* package:${basePackage}.${controllerPackage}
+* description:${tableComment}数据表映射实体
*
* @author ${author}
* @date ${date}
+* @since JDK1.8
*/
@Data
@TableName("${tableName}")
@@ -24,42 +28,42 @@
<#if columns??>
<#list columns as column>
- /**
- * ${column.remark}
- */
+ /**
+ * ${column.remark}
+ */
<#if column.isKey = true>
- @TableId(value = "${column.name}", type = IdType.AUTO)
+ @TableId(value = "${column.name}", type = IdType.AUTO)
<#else>
- @TableField("${column.name}")
+ @TableField("${column.name}")
</#if>
<#if (column.type = 'varchar' || column.type = 'text' || column.type = 'uniqueidentifier'
|| column.type = 'varchar2' || column.type = 'nvarchar' || column.type = 'VARCHAR2'
|| column.type = 'VARCHAR'|| column.type = 'CLOB' || column.type = 'char')>
- private String ${column.field?uncap_first};
+ private String ${column.field?uncap_first};
</#if>
<#if column.type = 'timestamp' || column.type = 'date' || column.type = 'datetime'||column.type = 'TIMESTAMP' || column.type = 'DATE' || column.type = 'DATETIME'>
- private Date ${column.field?uncap_first};
+ private Date ${column.field?uncap_first};
</#if>
- <#if column.type = 'int' || column.type = 'smallint'>
- private Integer ${column.field?uncap_first};
+ <#if column.type = 'int' || column.type = 'smallint'|| column.type = 'bit'>
+ private Integer ${column.field?uncap_first};
</#if>
<#if column.type = 'double'>
- private Double ${column.field?uncap_first};
+ private Double ${column.field?uncap_first};
</#if>
<#if column.type = 'bigint'>
- private Long ${column.field?uncap_first};
+ private Long ${column.field?uncap_first};
</#if>
<#if column.type = 'tinyint'>
- private Byte ${column.field?uncap_first};
+ private Byte ${column.field?uncap_first};
</#if>
<#if column.type = 'decimal' || column.type = 'numeric'>
- private BigDecimal ${column.field?uncap_first};
+ private BigDecimal ${column.field?uncap_first};
</#if>
</#list>
</#if>
--
Gitblit v1.8.0