获得request请求体的所有键值对
@RequestMapping("/delMany")
public String delMany(Integer[] ids, HttpServletRequest request) {
Map<String, String> map = new HashMap<String, String>();
Enumeration paramNames = request.getParameterNames();
while (paramNames.hasMoreElements()) {
String paramName = (String) paramNames.nextElement();
String[] paramValues = request.getParameterValues(paramName);
if (paramValues.length == 1) {
if (paramValues[0].length() != 0) {
map.put(paramName, paramValues[0]);
}
}
}
System.out.println(map);
orderService.delMany(ids);
return "redirect:/order/findAllByPageHelper";
}