All Downloads are FREE. Search and download functionalities are using the official Maven repository.

vm10.java.sub-domain.vm Maven / Gradle / Ivy

There is a newer version: 1.3.4.1
Show newest version
package ${packageName}.domain;

#foreach ($import in $subImportList)
import ${import};
#end
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * ${subTable.functionName}对象 ${subTableName}
 * 
 * @author ${author}
 * @date ${datetime}
 */
public class ${subClassName} extends BaseEntity
{
    private static final long serialVersionUID = 1L;

#foreach ($columns in $subTable.columns)
#if(!$tables.isSuperColumn($columns.javaField))
    /** $columns.columnComment */
#if($columns.list)
#set($parentheseIndex=$columns.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$columns.columnComment.substring(0, $parentheseIndex))
#else
#set($comment=$columns.columnComment)
#end
#if($parentheseIndex != -1)
    @Excel(name = "${comment}", readConverterExp = "$columns.readConverterExp()")
#elseif($columns.javaType == 'Date')
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
#else
    @Excel(name = "${comment}")
#end
#end
    private $columns.javaType $columns.javaField;

#end
#end
#foreach ($columns in $subTable.columns)
#if(!$tables.isSuperColumn($columns.javaField))
#if($columns.javaField.length() > 2 && $columns.javaField.substring(1,2).matches("[A-Z]"))
#set($AttrName=$columns.javaField)
#else
#set($AttrName=$columns.javaField.substring(0,1).toUpperCase() + ${columns.javaField.substring(1)})
#end
    public void set${AttrName}($columns.javaType $columns.javaField)
    {
        this.$columns.javaField = $columns.javaField;
    }

    public $columns.javaType get${AttrName}()
    {
        return $columns.javaField;
    }
#end
#end

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
#foreach ($columns in $subTable.columns)
#if($columns.javaField.length() > 2 && $columns.javaField.substring(1,2).matches("[A-Z]"))
#set($AttrName=$columns.javaField)
#else
#set($AttrName=$columns.javaField.substring(0,1).toUpperCase() + ${columns.javaField.substring(1)})
#end
            .append("${columns.javaField}", get${AttrName}())
#end
            .toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy