From 4ce1fa53d8cd7a7f5a3542239804ecc7c94165d5 Mon Sep 17 00:00:00 2001 From: shanzhiliu <1350700145@qq.com> Date: Wed, 7 Apr 2021 19:09:32 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tool/dal/mysql/codegen/ToolSchemaColumnMapper.java | 2 +- .../tool/dal/mysql/codegen/ToolSchemaTableMapper.java | 2 +- .../tool/service/codegen/impl/ToolCodegenServiceImpl.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java index 0ddfe4db2..14a0302da 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java +++ b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java @@ -10,7 +10,7 @@ import java.util.List; @Mapper public interface ToolSchemaColumnMapper extends BaseMapperX { - default List selectListByTableName(String tableSchema,String tableName) { + default List selectListByTableName(String tableSchema, String tableName) { return selectList(new QueryWrapper().eq("table_name", tableName) .eq("table_schema", tableSchema) .orderByAsc("ordinal_position")); diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java index 89821ae1c..622257c1c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java +++ b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java @@ -22,7 +22,7 @@ public interface ToolSchemaTableMapper extends BaseMapperX { return selectList(new QueryWrapper().eq("table_schema", tableSchema)); } - default ToolSchemaTableDO selectByTableName1(String tableSchema,String tableName) { + default ToolSchemaTableDO selectByTableName1(String tableSchema, String tableName) { return selectOne(new QueryWrapper().eq("table_schema",tableSchema) .eq("table_name", tableName)); } diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java b/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java index cff4931b9..adb9fbfec 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java +++ b/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java @@ -104,8 +104,8 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { //获取当前schema String tableSchema = codegenProperties.getDbSchemas().iterator().next(); // 从数据库中,获得数据库表结构 - ToolSchemaTableDO schemaTable = schemaTableMapper.selectByTableName1(tableSchema,tableName); - List schemaColumns = schemaColumnMapper.selectListByTableName(tableSchema,tableName); + ToolSchemaTableDO schemaTable = schemaTableMapper.selectByTableName1(tableSchema, tableName); + List schemaColumns = schemaColumnMapper.selectListByTableName(tableSchema, tableName); // 导入 return this.createCodegen0(ToolCodegenImportTypeEnum.DB, schemaTable, schemaColumns); } @@ -145,7 +145,7 @@ public class ToolCodegenServiceImpl implements ToolCodegenService { } String tableSchema = codegenProperties.getDbSchemas().iterator().next(); // 从数据库中,获得数据库表结构 - List schemaColumns = schemaColumnMapper.selectListByTableName(tableSchema,table.getTableName()); + List schemaColumns = schemaColumnMapper.selectListByTableName(tableSchema, table.getTableName()); // 执行同步 this.syncCodegen0(tableId, schemaColumns);