update 优化 !pr349 相关代码 完成代码生成多数据源统一存储

This commit is contained in:
疯狂的狮子li 2023-05-29 11:32:12 +08:00
parent f2892a672a
commit ee7c5fbbd9
4 changed files with 8 additions and 15 deletions

View File

@ -18,7 +18,7 @@ public interface GenTableColumnMapper extends BaseMapperPlus<GenTableColumn, Gen
* 根据表名称查询列信息 * 根据表名称查询列信息
* *
* @param tableName 表名称 * @param tableName 表名称
* @param dataName * @param dataName 数据源名称
* @return 列信息 * @return 列信息
*/ */
@DS("#dataName") @DS("#dataName")

View File

@ -54,7 +54,6 @@ import java.util.zip.ZipOutputStream;
* *
* @author Lion Li * @author Lion Li
*/ */
// @DS("#header.datasource")
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@Service @Service
@ -120,7 +119,7 @@ public class GenTableServiceImpl implements IGenTableService {
* 查询据库列表 * 查询据库列表
* *
* @param tableNames 表名称组 * @param tableNames 表名称组
* @param dataName * @param dataName 数据源名称
* @return 数据库表集合 * @return 数据库表集合
*/ */
@DS("#dataName") @DS("#dataName")
@ -143,7 +142,6 @@ public class GenTableServiceImpl implements IGenTableService {
* 修改业务 * 修改业务
* *
* @param genTable 业务信息 * @param genTable 业务信息
* @return 结果
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
@ -162,7 +160,6 @@ public class GenTableServiceImpl implements IGenTableService {
* 删除业务对象 * 删除业务对象
* *
* @param tableIds 需要删除的数据ID * @param tableIds 需要删除的数据ID
* @return 结果
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
@ -176,7 +173,7 @@ public class GenTableServiceImpl implements IGenTableService {
* 导入表结构 * 导入表结构
* *
* @param tableList 导入表列表 * @param tableList 导入表列表
* @param dataName * @param dataName 数据源名称
*/ */
@DSTransactional @DSTransactional
@Override @Override

View File

@ -43,7 +43,7 @@ public interface IGenTableService {
* 查询据库列表 * 查询据库列表
* *
* @param tableNames 表名称组 * @param tableNames 表名称组
* @param dataName * @param dataName 数据源名称
* @return 数据库表集合 * @return 数据库表集合
*/ */
List<GenTable> selectDbTableListByNames(String[] tableNames, String dataName); List<GenTable> selectDbTableListByNames(String[] tableNames, String dataName);
@ -67,7 +67,6 @@ public interface IGenTableService {
* 修改业务 * 修改业务
* *
* @param genTable 业务信息 * @param genTable 业务信息
* @return 结果
*/ */
void updateGenTable(GenTable genTable); void updateGenTable(GenTable genTable);
@ -75,7 +74,6 @@ public interface IGenTableService {
* 删除业务信息 * 删除业务信息
* *
* @param tableIds 需要删除的表数据ID * @param tableIds 需要删除的表数据ID
* @return 结果
*/ */
void deleteGenTableByIds(Long[] tableIds); void deleteGenTableByIds(Long[] tableIds);
@ -83,7 +81,7 @@ public interface IGenTableService {
* 导入表结构 * 导入表结构
* *
* @param tableList 导入表列表 * @param tableList 导入表列表
* @param dataName * @param dataName 数据源名称
*/ */
void importGenTable(List<GenTable> tableList, String dataName); void importGenTable(List<GenTable> tableList, String dataName);
@ -107,7 +105,6 @@ public interface IGenTableService {
* 生成代码自定义路径 * 生成代码自定义路径
* *
* @param tableId 表名称 * @param tableId 表名称
* @return 数据
*/ */
void generatorCode(Long tableId); void generatorCode(Long tableId);

View File

@ -125,7 +125,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and dt.table_name = uo.object_name and dt.table_name = uo.object_name
and uo.object_type = 'TABLE' and uo.object_type = 'TABLE'
AND dt.table_name NOT LIKE 'XXL_JOB_%' AND dt.table_name NOT LIKE 'GEN_%' AND dt.table_name NOT LIKE 'XXL_JOB_%' AND dt.table_name NOT LIKE 'GEN_%'
AND dt.table_name NOT IN (select table_name from gen_table)
and lower(dt.table_name) in and lower(dt.table_name) in
<foreach collection="array" item="name" open="(" separator="," close=")"> <foreach collection="array" item="name" open="(" separator="," close=")">
#{name} #{name}
@ -161,9 +160,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND F.MINOR_ID = 0 AND D.XTYPE = 'U' AND D.NAME != 'DTPROPERTIES' AND F.MINOR_ID = 0 AND D.XTYPE = 'U' AND D.NAME != 'DTPROPERTIES'
AND D.NAME NOT LIKE 'xxl_job_%' AND D.NAME NOT LIKE 'gen_%' AND D.NAME NOT LIKE 'xxl_job_%' AND D.NAME NOT LIKE 'gen_%'
AND D.NAME in AND D.NAME in
<foreach collection="array" item="name" open="(" separator="," close=")"> <foreach collection="array" item="name" open="(" separator="," close=")">
#{name} #{name}
</foreach> </foreach>
</if> </if>
</select> </select>