代码生成新增 toString
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
package ${package}.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
#foreach ($column in $columns)
|
||||
#if($column.attrType == 'Date')
|
||||
@ -24,21 +26,22 @@ public class ${className} extends BaseEntity
|
||||
#end
|
||||
|
||||
#foreach ($column in $columns)
|
||||
/**
|
||||
* 设置:${column.columnComment}
|
||||
*/
|
||||
public void set${column.attrName}($column.attrType $column.attrname)
|
||||
{
|
||||
this.$column.attrname = $column.attrname;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:${column.columnComment}
|
||||
*/
|
||||
|
||||
public $column.attrType get${column.attrName}()
|
||||
{
|
||||
return $column.attrname;
|
||||
}
|
||||
|
||||
#end
|
||||
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
#foreach ($column in $columns)
|
||||
.append("${column.attrname}", get${column.attrName}())
|
||||
#end
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user