代码生成器,增加 excel 导出功能

This commit is contained in:
YunaiV
2021-02-11 23:02:53 +08:00
parent 392dfa47c3
commit eb3d0386ee
35 changed files with 796 additions and 103 deletions

View File

@ -7,10 +7,10 @@ import ${basePackage}.${table.moduleName}.dal.dataobject.${table.businessName}.$
import ${PageResultClassName};
/**
* ${table.classComment} Service 接口
*
* @author ${table.author}
*/
* ${table.classComment} Service 接口
*
* @author ${table.author}
*/
public interface ${table.className}Service {
/**
@ -59,4 +59,12 @@ public interface ${table.className}Service {
*/
PageResult<${table.className}DO> get${simpleClassName}Page(${table.className}PageReqVO pageReqVO);
/**
* 获得${table.classComment}列表, 用于 Excel 导出
*
* @param exportReqVO 查询条件
* @return ${table.classComment}分页
*/
List<${table.className}DO> get${simpleClassName}List(${table.className}ExportReqVO exportReqVO);
}

View File

@ -19,10 +19,10 @@ import ${ServiceExceptionUtilClassName};
import static ${basePackage}.${table.moduleName}.enums.${simpleModuleName_upperFirst}ErrorCodeConstants.*;
/**
* ${table.classComment} Service 实现类
*
* @author ${table.author}
*/
* ${table.classComment} Service 实现类
*
* @author ${table.author}
*/
@Service
@Validated
public class ${table.className}ServiceImpl implements ${table.className}Service {
@ -77,4 +77,9 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
return ${classNameVar}Mapper.selectPage(pageReqVO);
}
@Override
public List<${table.className}DO> get${simpleClassName}List(${table.className}ExportReqVO exportReqVO) {
return ${classNameVar}Mapper.selectList(exportReqVO);
}
}