matrixs = dataMatrixService.listByCondition(condition);
}
List<SeniorDataMatrix> seniorMatrixs = new ArrayList<SeniorDataMatrix>();
for (DataMatrix matrix : matrixs) {
SeniorDataMatrix seniorMatrix = new SeniorDataMatrix();
seniorMatrix.setId(matrix.getId());
seniorMatrix.setGroupKey(matrix.getGroupKey());
seniorMatrix.setMaster(matrix.getMaster());
seniorMatrix.setSlave(matrix.getSlave());
seniorMatrix.setGmtCreate(matrix.getGmtCreate());
seniorMatrix.setGmtModified(matrix.getGmtModified());
Map dataSourceCondition = new HashMap();
condition.put("searchKey", "jdbc:mysql://groupKey=" + matrix.getGroupKey());
List<DataMediaSource> dataSources = dataMediaSourceService.listByCondition(dataSourceCondition);
seniorMatrix.setUsed(!CollectionUtils.isEmpty(dataSources));
seniorMatrixs.add(seniorMatrix);
}
context.put("dataMatrixs", seniorMatrixs);