Browse Source

屏蔽基类字段实体生成

pull/83/head
RuoYi 6 years ago
parent
commit
d92be7b3a3
  1. 6
      ruoyi-generator/src/main/resources/vm/java/domain.java.vm

6
ruoyi-generator/src/main/resources/vm/java/domain.java.vm

@ -4,7 +4,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.attrType == 'Date') #if($column.attrType == 'Date' && ($column.attrname != 'createBy' && $column.attrname != 'createTime' && $column.attrname != 'updateBy' && $column.attrname != 'updateTime' && $column.attrname != 'remark'))
import java.util.Date; import java.util.Date;
#break #break
#end #end
@ -21,11 +21,14 @@ public class ${className} extends BaseEntity
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.attrname != 'createBy' && $column.attrname != 'createTime' && $column.attrname != 'updateBy' && $column.attrname != 'updateTime' && $column.attrname != 'remark')
/** $column.columnComment */ /** $column.columnComment */
private $column.attrType $column.attrname; private $column.attrType $column.attrname;
#end #end
#end
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.attrname != 'createBy' && $column.attrname != 'createTime' && $column.attrname != 'updateBy' && $column.attrname != 'updateTime' && $column.attrname != 'remark')
public void set${column.attrName}($column.attrType $column.attrname) public void set${column.attrName}($column.attrType $column.attrname)
{ {
this.$column.attrname = $column.attrname; this.$column.attrname = $column.attrname;
@ -35,6 +38,7 @@ public class ${className} extends BaseEntity
{ {
return $column.attrname; return $column.attrname;
} }
#end
#end #end
public String toString() { public String toString() {

Loading…
Cancel
Save