From a33898c2a0374c249862a2b996e33352e30c8caf Mon Sep 17 00:00:00 2001 From: KonBAI <1527468660@qq.com> Date: 星期六, 02 四月 2022 13:02:56 +0800 Subject: [PATCH] !167 update 修改角色"菜单树选择项"和"部门树选择项"是否关联显示字段为Boolean类型 * fix 修改 postgres sql脚本,处理角色表字段类型错误问题。 * fix 修复postgreSQL新增或更新角色信息报错。修改角色"菜单树选择项"和"部门树选择项"是否关联显示字段为Boolean类型。 --- ruoyi-generator/src/main/resources/vm/java/domain.java.vm | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm index 29a4f23..8fde4ad 100644 --- a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm +++ b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm @@ -3,10 +3,18 @@ import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import lombok.NoArgsConstructor; -import lombok.experimental.Accessors; import java.io.Serializable; import java.util.Date; import java.math.BigDecimal; + +#foreach ($import in $importList) +import ${import}; +#end +#if($table.crud || $table.sub) +import com.ruoyi.common.core.domain.BaseEntity; +#elseif($table.tree) +import com.ruoyi.common.core.domain.TreeEntity; +#end /** * ${functionName}瀵硅薄 ${tableName} @@ -14,25 +22,22 @@ * @author ${author} * @date ${datetime} */ +#if($table.crud || $table.sub) + #set($Entity="BaseEntity") +#elseif($table.tree) + #set($Entity="TreeEntity<${ClassName}>") +#end @Data -@NoArgsConstructor -@Accessors(chain = true) @TableName("${tableName}") -public class ${ClassName} implements Serializable { +public class ${ClassName} extends ${Entity} { private static final long serialVersionUID=1L; #foreach ($column in $columns) - +#if(!$table.isSuperColumn($column.javaField)) /** * $column.columnComment */ -#if($column.javaField=="createBy"||$column.javaField=="createTime") - @TableField(fill = FieldFill.INSERT) -#end -#if($column.javaField=="updateBy"||$column.javaField=="updateTime") - @TableField(fill = FieldFill.INSERT_UPDATE) -#end #if($column.javaField=='delFlag') @TableLogic #end @@ -44,5 +49,6 @@ #end private $column.javaType $column.javaField; #end +#end } -- Gitblit v1.9.3