类 GenTableServiceImpl
java.lang.Object
top.binfast.daemon.codegen.service.GenTableServiceImpl
- 所有已实现的接口:
IGenTableService
业务 服务层实现
- 作者:
- Lion Li
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voiddeleteGenTableByIds(Long[] tableIds) 删除业务对象byte[]downloadCode(Long tableId) 生成代码(下载方式)byte[]downloadCode(String[] tableIds) 批量生成代码(下载方式)voidgeneratorCode(Long tableId) 生成代码(自定义路径)static StringgetGenPath(GenTable table, String template) 获取代码生成地址voidimportGenTable(List<GenTable> tableList, String dataName) 导入表结构previewCode(Long tableId) 预览代码selectDbTableColumnsByName(String tableName, String dataName, String dataSourceName) 根据表名称查询列信息selectDbTableListByNames(String[] tableNames, String dataName, String dataSourceName) 查询据库列表查询所有表信息查询业务信息selectGenTableColumnListByTableId(Long tableId) 查询业务字段列表com.alibaba.cola.dto.PageResponse<GenTable> 查询数据库列表com.alibaba.cola.dto.PageResponse<GenTable> 查询业务列表voidsetPkColumn(GenTable table) 设置主键列信息voidsetTableFromOptions(GenTable genTable) 设置代码生成其他选项值void同步数据库voidupdateGenTable(GenTable genTable) 修改业务voidvalidateEdit(GenTable genTable) 修改保存参数校验
-
构造器详细资料
-
GenTableServiceImpl
public GenTableServiceImpl()
-
-
方法详细资料
-
getGenPath
获取代码生成地址- 参数:
table- 业务表信息template- 模板文件路径- 返回:
- 生成地址
-
selectGenTableColumnListByTableId
查询业务字段列表- 指定者:
selectGenTableColumnListByTableId在接口中IGenTableService- 参数:
tableId- 业务字段编号- 返回:
- 业务字段集合
-
selectGenTableById
查询业务信息- 指定者:
selectGenTableById在接口中IGenTableService- 参数:
id- 业务ID- 返回:
- 业务信息
-
selectPageGenTableList
从接口复制的说明:IGenTableService查询业务列表- 指定者:
selectPageGenTableList在接口中IGenTableService- 参数:
param- 业务信息- 返回:
- 业务集合
-
selectPageDbTableList
@DS("#param.dataSourceName") public com.alibaba.cola.dto.PageResponse<GenTable> selectPageDbTableList(GenTableParam param) 查询数据库列表- 指定者:
selectPageDbTableList在接口中IGenTableService- 参数:
param- 业务信息- 返回:
- 包含分页结果的TableDataInfo对象
-
selectDbTableListByNames
@DS("#dataSourceName") public List<GenTable> selectDbTableListByNames(String[] tableNames, String dataName, String dataSourceName) 查询据库列表- 指定者:
selectDbTableListByNames在接口中IGenTableService- 参数:
tableNames- 表名称组dataName- 数据源名称- 返回:
- 数据库表集合
-
selectGenTableAll
查询所有表信息- 指定者:
selectGenTableAll在接口中IGenTableService- 返回:
- 表信息集合
-
updateGenTable
修改业务- 指定者:
updateGenTable在接口中IGenTableService- 参数:
genTable- 业务信息
-
deleteGenTableByIds
@Transactional(rollbackFor=java.lang.Exception.class) public void deleteGenTableByIds(Long[] tableIds) 删除业务对象- 指定者:
deleteGenTableByIds在接口中IGenTableService- 参数:
tableIds- 需要删除的数据ID
-
importGenTable
导入表结构- 指定者:
importGenTable在接口中IGenTableService- 参数:
tableList- 导入表列表dataName- 数据源名称
-
selectDbTableColumnsByName
@DS("#dataSourceName") public List<GenTableColumn> selectDbTableColumnsByName(String tableName, String dataName, String dataSourceName) 根据表名称查询列信息- 指定者:
selectDbTableColumnsByName在接口中IGenTableService- 参数:
tableName- 表名称dataName- 数据源名称- 返回:
- 列信息
-
previewCode
预览代码- 指定者:
previewCode在接口中IGenTableService- 参数:
tableId- 表编号- 返回:
- 预览数据列表
-
downloadCode
生成代码(下载方式)- 指定者:
downloadCode在接口中IGenTableService- 参数:
tableId- 表名称- 返回:
- 数据
-
generatorCode
生成代码(自定义路径)- 指定者:
generatorCode在接口中IGenTableService- 参数:
tableId- 表名称
-
synchDb
同步数据库- 指定者:
synchDb在接口中IGenTableService- 参数:
tableId- 表名称
-
downloadCode
批量生成代码(下载方式)- 指定者:
downloadCode在接口中IGenTableService- 参数:
tableIds- 表ID数组- 返回:
- 数据
-
validateEdit
修改保存参数校验- 指定者:
validateEdit在接口中IGenTableService- 参数:
genTable- 业务信息
-
setPkColumn
设置主键列信息- 参数:
table- 业务表信息
-
setTableFromOptions
设置代码生成其他选项值- 参数:
genTable- 设置后的生成对象
-