| | |
| | | * @param genTable 业务信息 |
| | | * @return 数据库表集合 |
| | | */ |
| | | @Override |
| | | public List<GenTable> selectDbTableList(GenTable genTable) |
| | | { |
| | | return genTableMapper.selectDbTableList(genTable); |
| | |
| | | * @param tableNames 表名称组 |
| | | * @return 数据库表集合 |
| | | */ |
| | | @Override |
| | | public List<GenTable> selectDbTableListByNames(String[] tableNames) |
| | | { |
| | | return genTableMapper.selectDbTableListByNames(tableNames); |
| | |
| | | /** |
| | | * 删除业务对象 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @param tableIds 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | |
| | | public void importGenTable(List<GenTable> tableList) |
| | | { |
| | | String operName = SecurityUtils.getUsername(); |
| | | for (GenTable table : tableList) |
| | | try |
| | | { |
| | | try |
| | | for (GenTable table : tableList) |
| | | { |
| | | String tableName = table.getTableName(); |
| | | GenUtils.initTable(table, operName); |
| | |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | log.error("表名 " + table.getTableName() + " 导入失败:", e); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new CustomException("导入失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | |
| | | * @param tableId 表编号 |
| | | * @return 预览数据列表 |
| | | */ |
| | | @Override |
| | | public Map<String, String> previewCode(Long tableId) |
| | | { |
| | | Map<String, String> dataMap = new LinkedHashMap<>(); |
| | |
| | | * |
| | | * @param genTable 业务信息 |
| | | */ |
| | | @Override |
| | | public void validateEdit(GenTable genTable) |
| | | { |
| | | if (GenConstants.TPL_TREE.equals(genTable.getTplCategory())) |
| | |
| | | /** |
| | | * 设置主键列信息 |
| | | * |
| | | * @param genTable 业务表信息 |
| | | * @param table 业务表信息 |
| | | * @param columns 业务字段列表 |
| | | */ |
| | | public void setPkColumn(GenTable table, List<GenTableColumn> columns) |