/** * 删除一条记录 * * @return */ public String deleteOne() { init(); String id = request.getParameter("id"); Integer type = Integer.parseInt(request.getParameter("type")); try { personService.deleteOne(id, type); response.getWriter().write("ok"); response.flushBuffer(); response.getWriter().close(); } catch (IOException e) { e.printStackTrace(); } return NONE; }
public String deleteChecked() { init(); Integer type = Integer.parseInt(request.getParameter("type")); String resoult = request.getParameter("resoult"); String[] strings = resoult.split(","); try { for (String string : strings) { personService.deleteOne(string, type); } response.getWriter().write("ok"); response.flushBuffer(); response.getWriter().close(); } catch (IOException e) { e.printStackTrace(); } return NONE; }