|
@@ -40,14 +40,16 @@ public class MemberRankPrivilegesServiceImpl extends BaseServiceImpl<Integer, Me
|
|
|
Map<Integer, MemberPrivilegesItem> map = new HashMap<Integer, MemberPrivilegesItem>();
|
|
|
|
|
|
for (MemberPrivilegesItem item : memberPrivilegesItemList) {
|
|
|
-
|
|
|
- MemberPrivilegesItem memberPrivilegesItem = queryParentBysubId(item);
|
|
|
-
|
|
|
- if (map.containsKey(memberPrivilegesItem.getId())) {
|
|
|
-
|
|
|
- memberPrivilegesItem = addSubItemToParent(map.get(memberPrivilegesItem.getId()), memberPrivilegesItem);
|
|
|
+
|
|
|
+ if(!map.containsKey(item.getId())){
|
|
|
+ MemberPrivilegesItem memberPrivilegesItem = queryParentBysubId(item);
|
|
|
+
|
|
|
+ if (map.containsKey(memberPrivilegesItem.getId())) {
|
|
|
+
|
|
|
+ memberPrivilegesItem = addSubItemToParent(map.get(memberPrivilegesItem.getId()), item);
|
|
|
+ }
|
|
|
+ map.put(memberPrivilegesItem.getId(), memberPrivilegesItem);
|
|
|
}
|
|
|
- map.put(memberPrivilegesItem.getId(), memberPrivilegesItem);
|
|
|
}
|
|
|
|
|
|
return map.values().stream().collect(Collectors.toList());
|