baomidou / mybatis-plus

An powerful enhanced toolkit of MyBatis for simplify development
https://baomidou.com
Apache License 2.0
16.12k stars 4.26k forks source link

达梦数据表比较多时com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder下的getTableInfoList查询超时 #6302

Open yangyongbin89 opened 2 weeks ago

yangyongbin89 commented 2 weeks ago

当前使用版本 3.5.7

当前环境信息 Java8 + 达梦数据库(表比较多)

描述bug现象 com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder下的getTableInfoList查询超时 com.baomidou.mybatisplus.generator.config.StrategyConfig设置tablePrefix不生效 com.baomidou.mybatisplus.generator.config.StrategyConfig建议添加查询字段的开关,有时并不需要查询字段,只是单纯想查询表

提供问题复现步骤

请尽量提供复现工程,减少大家排错的时间.

yangyongbin89 commented 2 weeks ago

关键代码: final StrategyConfig.Builder strategyConfig = new StrategyConfig.Builder(); strategyConfig.addTablePrefix("QRTZ", "ACT", "FLW", "JIMU");

final GlobalConfig globalConfig = new GlobalConfig.Builder().dateType(DateType.ONLY_DATE).build(); final ConfigBuilder builder = new ConfigBuilder(null, dataSourceConfig, strategyConfig.build(), null, globalConfig, null); final List tables = builder.getTableInfoList();

com.baomidou.mybatisplus.generator.config.querys.DbQueryDecorator.tablesSql()设置tablePrefix不生效 com.baomidou.mybatisplus.generator.IDatabaseQuery.DefaultDatabaseQuery.queryTables建议添加查询字段的开关,有时并不需要查询字段,只是单纯想查询表