@RequestMapping("whitelist-type-list") public String list( @ModelAttribute Page page, @RequestParam Map<String, Object> parameterMap, Model model) { String tenantId = tenantHolder.getTenantId(); List<PropertyFilter> propertyFilters = PropertyFilter.buildFromMap(parameterMap); propertyFilters.add(new PropertyFilter("EQS_tenantId", tenantId)); page = whitelistTypeManager.pagedQuery(page, propertyFilters); model.addAttribute("page", page); return "whitelist/whitelist-type-list"; }
@RequestMapping("whitelist-type-export") public void export( @ModelAttribute Page page, @RequestParam Map<String, Object> parameterMap, HttpServletRequest request, HttpServletResponse response) throws Exception { String tenantId = tenantHolder.getTenantId(); List<PropertyFilter> propertyFilters = PropertyFilter.buildFromMap(parameterMap); propertyFilters.add(new PropertyFilter("EQS_tenantId", tenantId)); page = whitelistTypeManager.pagedQuery(page, propertyFilters); List<WhitelistType> whitelistTypes = (List<WhitelistType>) page.getResult(); TableModel tableModel = new TableModel(); tableModel.setName("whitelistType"); tableModel.addHeaders("id", "name"); tableModel.setData(whitelistTypes); exportor.export(request, response, tableModel); }