|
|
@@ -66,10 +66,10 @@ public class DBAService {
|
|
|
masters.addAll(baseRepository.queryForBeanList("select * from master where ma_enable=1", Master.class));
|
|
|
} else {
|
|
|
// 说明是SYSTEM账号
|
|
|
- List<String> users = baseRepository.queryForList("select owner from all_tables where table_name='MASTER'", String.class);
|
|
|
+ List<String> users = baseRepository.queryForList("select distinct owner from all_tab_cols where table_name='MASTER' and column_name='MA_ENABLE' order by owner", String.class);
|
|
|
if (!CollectionUtils.isEmpty(users)) {
|
|
|
for (String user : users) {
|
|
|
- masters.addAll(baseRepository.queryForBeanList("select * from " + user + ".master where ma_enable=1", Master.class));
|
|
|
+ masters.addAll(baseRepository.queryForBeanList("select * from " + user + ".master where ma_enable=1 order by ma_user", Master.class));
|
|
|
}
|
|
|
}
|
|
|
}
|