@RequestMapping(value="/list", method={RequestMethod.GET, RequestMethod.POST})
public String list(Long id, ServletRequest request, Page page, Map<String, Object> map) {
Specification<Dictionary> specification = null;
if (id != null) {
specification = DynamicSpecifications.bySearchFilter(request, Dictionary.class,
new SearchFilter("parent.id", Operator.EQ, id));
map.put("dictionaryType", DictionaryType.ITEM.name());
map.put("pDictionary", dictionaryService.get(id));
} else {
specification = DynamicSpecifications.bySearchFilter(request, Dictionary.class,
new SearchFilter("type", Operator.EQ, DictionaryType.THEME.name()));
map.put("dictionaryType", DictionaryType.THEME.name());
}
List<Dictionary> dictionarys = dictionaryService.findByExample(specification, page);
map.put("page", page);