|
|
@@ -10,10 +10,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashSet;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Set;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* Created by Pro1 on 2017/7/27.
|
|
|
@@ -63,7 +60,7 @@ public class DBAService {
|
|
|
Integer count = baseRepository.queryForObject("select count(1) from user_tables where table_name='MASTER'", Integer.class);
|
|
|
if (count == 1) {
|
|
|
// 本账套有Master表,说明是默认账套
|
|
|
- masters.addAll(baseRepository.queryForBeanList("select * from master where ma_enable=1", Master.class));
|
|
|
+ masters.addAll(baseRepository.queryForBeanList("select * from master where ma_enable=1 order by ma_user", Master.class));
|
|
|
} else {
|
|
|
// 说明是SYSTEM账号
|
|
|
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);
|
|
|
@@ -78,7 +75,7 @@ public class DBAService {
|
|
|
master.setMa_url(dba.url());
|
|
|
}
|
|
|
}
|
|
|
- return new HashSet<>(masters);
|
|
|
+ return new LinkedHashSet<>(masters);
|
|
|
}
|
|
|
|
|
|
}
|