|
|
|
@ -1,9 +1,9 @@
|
|
|
|
|
package cokr.xit.foundation.web;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
import org.springframework.web.method.HandlerMethod;
|
|
|
|
@ -42,11 +42,11 @@ public class RequestHandlerReader extends AbstractComponent {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Set<String> parentIDs = nameURLs.stream()
|
|
|
|
|
nameURLs.stream()
|
|
|
|
|
.filter(row -> !isEmpty(row.get("parentID")))
|
|
|
|
|
.map(row -> row.string("parentID"))
|
|
|
|
|
.collect(Collectors.toSet());
|
|
|
|
|
parentIDs.forEach(parentID -> {
|
|
|
|
|
.collect(Collectors.toSet())
|
|
|
|
|
.forEach(parentID -> {
|
|
|
|
|
nameURLs.add(menuItem(null, parentID));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -62,7 +62,10 @@ public class RequestHandlerReader extends AbstractComponent {
|
|
|
|
|
})
|
|
|
|
|
.setElements(nameURLs)
|
|
|
|
|
.build();
|
|
|
|
|
return tree.topElements();
|
|
|
|
|
|
|
|
|
|
List<DataObject> top = tree.topElements();
|
|
|
|
|
Collections.sort(top, (u0, u1) -> u0.string("url").compareTo(u1.string("url")));
|
|
|
|
|
return top;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static DataObject menuItem(String name, String path) {
|
|
|
|
|