init2
This commit is contained in:
42
doc/easycode/wrapper.java.vm
Normal file
42
doc/easycode/wrapper.java.vm
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
##导入宏定义
|
||||||
|
$!{define.vm}
|
||||||
|
|
||||||
|
##设置表后缀(宏定义)
|
||||||
|
#setTableSuffix("Wrapper")
|
||||||
|
|
||||||
|
##保存文件(宏定义)
|
||||||
|
#save("/wrapper", "Wrapper.java")
|
||||||
|
|
||||||
|
##包路径(宏定义)
|
||||||
|
#setPackageSuffix("wrapper")
|
||||||
|
|
||||||
|
|
||||||
|
##定义实体对象名
|
||||||
|
#set($entityName = $!tool.firstLowerCase($!tableInfo.name))
|
||||||
|
|
||||||
|
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||||
|
import org.springblade.core.tool.utils.BeanUtil;
|
||||||
|
import $!{tableInfo.savePackageName}.entity.$!tableInfo.name;
|
||||||
|
import $!{tableInfo.savePackageName}.vo.$!{tableInfo.name}VO;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
##表注释(宏定义)
|
||||||
|
#tableComment("实体包装类")
|
||||||
|
public class $!{tableInfo.name}Wrapper extends BaseEntityWrapper<$!tableInfo.name,$!{tableInfo.name}VO> {
|
||||||
|
|
||||||
|
public static $!{tableInfo.name}Wrapper build() {
|
||||||
|
return new $!{tableInfo.name}Wrapper();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public $!{tableInfo.name}VO entityVO($!{tableInfo.name} $entityName) {
|
||||||
|
$!{tableInfo.name}VO vo = Objects.requireNonNull(BeanUtil.copy($entityName, $!{tableInfo.name}VO.class));
|
||||||
|
|
||||||
|
//User createUser = UserCache.getUser(version.getCreateUser());
|
||||||
|
//User updateUser = UserCache.getUser(version.getUpdateUser());
|
||||||
|
//versionVO.setCreateUserName(createUser.getName());
|
||||||
|
//versionVO.setUpdateUserName(updateUser.getName());
|
||||||
|
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user