|
|
|
@ -1,54 +1,56 @@
|
|
|
|
|
package ${packageName}.domain;
|
|
|
|
|
|
|
|
|
|
#foreach ($import in $importList)
|
|
|
|
|
import ${import};
|
|
|
|
|
#end
|
|
|
|
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
|
|
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
|
|
|
import com.ruoyi.common.core.annotation.Excel;
|
|
|
|
|
#if($table.crud)
|
|
|
|
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
|
|
|
|
#elseif($table.tree)
|
|
|
|
|
import com.ruoyi.common.core.web.domain.TreeEntity;
|
|
|
|
|
#end
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
/**
|
|
|
|
|
* ${functionName}对象 ${tableName}
|
|
|
|
|
*
|
|
|
|
|
* @author ${author}
|
|
|
|
|
* @date ${datetime}
|
|
|
|
|
*/
|
|
|
|
|
#if($table.crud)
|
|
|
|
|
#set($Entity="BaseEntity")
|
|
|
|
|
#elseif($table.tree)
|
|
|
|
|
#set($Entity="TreeEntity")
|
|
|
|
|
#end
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class ${ClassName} extends ${Entity}
|
|
|
|
|
{
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
|
|
|
|
#foreach ($column in $columns)
|
|
|
|
|
#if(!$table.isSuperColumn($column.javaField))
|
|
|
|
|
/** $column.columnComment */
|
|
|
|
|
#if($column.list)
|
|
|
|
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
|
|
|
|
#if($parentheseIndex != -1)
|
|
|
|
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
|
|
|
|
#else
|
|
|
|
|
#set($comment=$column.columnComment)
|
|
|
|
|
#end
|
|
|
|
|
#if($parentheseIndex != -1)
|
|
|
|
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
|
|
|
|
#elseif($column.javaType == 'Date')
|
|
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
|
|
|
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
|
|
|
|
|
#else
|
|
|
|
|
@Excel(name = "${comment}")
|
|
|
|
|
#end
|
|
|
|
|
#end
|
|
|
|
|
private $column.javaType $column.javaField;
|
|
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
#end
|
|
|
|
|
package ${packageName}.domain;
|
|
|
|
|
|
|
|
|
|
#foreach ($import in $importList)
|
|
|
|
|
import ${import};
|
|
|
|
|
#end
|
|
|
|
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
|
|
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
|
|
|
import com.ruoyi.common.core.annotation.Excel;
|
|
|
|
|
#if($table.crud)
|
|
|
|
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
|
|
|
|
#elseif($table.tree)
|
|
|
|
|
import com.ruoyi.common.core.web.domain.TreeEntity;
|
|
|
|
|
#end
|
|
|
|
|
import lombok.Data;
|
|
|
|
|
import lombok.Builder;
|
|
|
|
|
/**
|
|
|
|
|
* ${functionName}对象 ${tableName}
|
|
|
|
|
*
|
|
|
|
|
* @author ${author}
|
|
|
|
|
* @date ${datetime}
|
|
|
|
|
*/
|
|
|
|
|
#if($table.crud)
|
|
|
|
|
#set($Entity="BaseEntity")
|
|
|
|
|
#elseif($table.tree)
|
|
|
|
|
#set($Entity="TreeEntity")
|
|
|
|
|
#end
|
|
|
|
|
@Data
|
|
|
|
|
@Builder
|
|
|
|
|
public class ${ClassName} extends ${Entity}
|
|
|
|
|
{
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
|
|
|
|
#foreach ($column in $columns)
|
|
|
|
|
#if(!$table.isSuperColumn($column.javaField))
|
|
|
|
|
/** $column.columnComment */
|
|
|
|
|
#if($column.list)
|
|
|
|
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
|
|
|
|
#if($parentheseIndex != -1)
|
|
|
|
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
|
|
|
|
#else
|
|
|
|
|
#set($comment=$column.columnComment)
|
|
|
|
|
#end
|
|
|
|
|
#if($parentheseIndex != -1)
|
|
|
|
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
|
|
|
|
#elseif($column.javaType == 'Date')
|
|
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
|
|
|
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
|
|
|
|
|
#else
|
|
|
|
|
@Excel(name = "${comment}")
|
|
|
|
|
#end
|
|
|
|
|
#end
|
|
|
|
|
private $column.javaType $column.javaField;
|
|
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
#end
|
|
|
|
|
}
|