|
@@ -1069,11 +1069,16 @@ public class KmtExerciseMapperServiceImpl implements KmtExerciseMapperService {
|
|
private List<ExerciseBookDto> sortByBookName (List<ExerciseBookDto> list){
|
|
private List<ExerciseBookDto> sortByBookName (List<ExerciseBookDto> list){
|
|
if (list != null){
|
|
if (list != null){
|
|
Map<String, List<ExerciseBookDto>> temp = new HashMap<>();
|
|
Map<String, List<ExerciseBookDto>> temp = new HashMap<>();
|
|
|
|
+ List<ExerciseBookDto> tempMapList;
|
|
for (ExerciseBookDto item : list){
|
|
for (ExerciseBookDto item : list){
|
|
if (temp.containsKey(item.getName())){
|
|
if (temp.containsKey(item.getName())){
|
|
- temp.get(item.getName()).add(item);
|
|
|
|
|
|
+ tempMapList = temp.get(item.getName());
|
|
|
|
+ tempMapList.add(item);
|
|
|
|
+ temp.put(item.getName(), tempMapList);
|
|
} else {
|
|
} else {
|
|
- temp.put(item.getName(), Collections.singletonList(item));
|
|
|
|
|
|
+ tempMapList = new ArrayList<>();
|
|
|
|
+ tempMapList.add(item);
|
|
|
|
+ temp.put(item.getName(), tempMapList);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
ArrayList tempList = new ArrayList(temp.keySet());
|
|
ArrayList tempList = new ArrayList(temp.keySet());
|