Pre Merge pull request !44 from wodeyangzipingpingwuqi/dev_2.6.1

This commit is contained in:
wodeyangzipingpingwuqi 2024-01-29 03:35:21 +00:00 committed by Gitee
commit b875152578
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -339,14 +339,14 @@ public class GroupConfigServiceImpl implements GroupConfigService {
String schema = connection.getSchema();
// https://gitee.com/aizuda/easy-retry/issues/I8DAMH
String sql = MessageFormatter.arrayFormat("SELECT table_name\n"
+ "FROM information_schema.tables\n"
+ "WHERE table_name LIKE 'retry_task_%' AND table_schema = '{}' and table_catalog = '{}'", new Object[]{schema, catalog}).getMessage();
String sql = MessageFormatter.arrayFormat("SELECT table_name\n"
+ "FROM information_schema.tables\n"
+ "WHERE table_name LIKE 'retry_task_%' AND (table_schema = '{}' OR table_schema = '{}' OR table_catalog = '{}' OR table_catalog = '{}')", new Object[]{schema, catalog, schema, catalog}).getMessage();
List<String> tableList = jdbcTemplate.queryForList(sql, String.class);
return tableList.stream().map(ReUtil::getFirstNumber).filter(i ->
!Objects.isNull(i) && i <= systemProperties.getTotalPartition()).distinct()
.collect(Collectors.toList());
!Objects.isNull(i) && i <= systemProperties.getTotalPartition()).distinct()
.collect(Collectors.toList());
} catch (SQLException ignored) {
} finally {
if (Objects.nonNull(connection)) {