Commit b5125880 authored by fangxinjiang's avatar fangxinjiang

代码生成器调整

parent c475c2f7
......@@ -42,20 +42,29 @@ import java.math.BigDecimal;
public class ${className} extends BaseEntity {
#foreach ($column in $columns)
## 排除部分字段
#if(!$excludeColumns.contains($column.columnName))
## 排除部分字段
#if(!$excludeColumns.contains($column.columnName))
/**
* $column.comments
*/
#if($column.columnName == $pk.columnName)
#if($column.columnName == $pk.columnName)
@TableId(type = IdType.ASSIGN_ID)
#end
@ExcelAttribute(name = "$column.comments"#if($column.isNullable =='NO' && $column.attrType !='LocalDate' && $column.attrType !='LocalDateTime'), isNotEmpty = true,errorInfo = "$column.comments不能为空"#end #if($column.maxLength), maxLength = $column.maxLength #end)
#end
#end
#if($column.nullable)
@NotBlank(message = "$column.comments 不能为空")
#end
#if($column.maxLength && $column.attrType =='String')
@Length(max=$column.maxLength,message = "$column.comments 不能超过$column.maxLength 个字符")
#end
@ExcelAttribute(name = "$column.comments"#if($column.nullable), isNotEmpty = true,errorInfo = "$column.comments 不能为空" #end #if($column.attrType =='LocalDate' || $column.attrType =='LocalDateTime') ,isDate = true #end #if($column.maxLength), maxLength = $column.maxLength #end)
@Schema(description ="$column.comments"#if($column.hidden),hidden=$column.hidden#end)
@ExcelProperty("$column.comments")
#if($column.attrType =='LocalDate' || $column.attrType =='LocalDateTime' || $column.attrType =='Date')
private Date $column.lowerAttrName;
#else
private $column.attrType $column.lowerAttrName;
#end
#end
#end
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment