Showing
1 changed file
with
5 additions
and
2 deletions
@@ -40,7 +40,6 @@ import org.springframework.stereotype.Service; | @@ -40,7 +40,6 @@ import org.springframework.stereotype.Service; | ||
40 | import org.springframework.util.CollectionUtils; | 40 | import org.springframework.util.CollectionUtils; |
41 | 41 | ||
42 | import java.util.*; | 42 | import java.util.*; |
43 | -import java.util.stream.Collectors; | ||
44 | 43 | ||
45 | @Service | 44 | @Service |
46 | public class YzService extends BaseSceneService { | 45 | public class YzService extends BaseSceneService { |
@@ -98,7 +97,11 @@ public class YzService extends BaseSceneService { | @@ -98,7 +97,11 @@ public class YzService extends BaseSceneService { | ||
98 | } | 97 | } |
99 | //按照固定的顺序重排序 | 98 | //按照固定的顺序重排序 |
100 | List<Map<String, String>> maxSortListSorted = new ArrayList<>(); | 99 | List<Map<String, String>> maxSortListSorted = new ArrayList<>(); |
101 | - Map<String, Map<String, String>> sortInfoMap = maxList.stream().collect(Collectors.toMap(p -> p.get("sort_id"), p -> p)); | 100 | + Map<String, Map<String, String>> sortInfoMap = new HashMap<>(); |
101 | + for (Map<String, String> map : maxList) { | ||
102 | + String sortId = map.get("sort_id"); | ||
103 | + sortInfoMap.put(sortId, map); | ||
104 | + } | ||
102 | for (String sortId : maxSortIdOrderList) { | 105 | for (String sortId : maxSortIdOrderList) { |
103 | if (sortInfoMap.containsKey(sortId)) { | 106 | if (sortInfoMap.containsKey(sortId)) { |
104 | maxSortListSorted.add(sortInfoMap.get(sortId)); | 107 | maxSortListSorted.add(sortInfoMap.get(sortId)); |
-
Please register or login to post a comment