init2
This commit is contained in:
34
doc/easycode/serviceImpl.java.vm
Normal file
34
doc/easycode/serviceImpl.java.vm
Normal file
@@ -0,0 +1,34 @@
|
||||
##导入宏定义
|
||||
$!{define.vm}
|
||||
|
||||
##设置表后缀(宏定义)
|
||||
#setTableSuffix("ServiceImpl")
|
||||
|
||||
##保存文件(宏定义)
|
||||
#save("/service/impl", "ServiceImpl.java")
|
||||
|
||||
##包路径(宏定义)
|
||||
#setPackageSuffix("service.impl")
|
||||
##定义实体对象名
|
||||
#set($entityName = $!tool.firstLowerCase($!tableInfo.name))
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import $!{tableInfo.savePackageName}.mapper.$!{tableInfo.name}Mapper;
|
||||
import $!{tableInfo.savePackageName}.entity.$!{tableInfo.name};
|
||||
import $!{tableInfo.savePackageName}.service.$!{tableInfo.name}Service;
|
||||
|
||||
|
||||
##表注释(宏定义)
|
||||
#tableComment("服务实现")
|
||||
@Service("$!{entityName}Service")
|
||||
public class $!{tableName} extends BaseServiceImpl<$!{tableInfo.name}Mapper, $!{tableInfo.name}> implements $!{tableInfo.name}Service {
|
||||
|
||||
@Override
|
||||
public IPage<$!{tableInfo.name}> selectPage(IPage<$!{tableInfo.name}> page, $!{tableInfo.name} $entityName) {
|
||||
return page.setRecords(baseMapper.selectPage(page, $entityName));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user