コード例 #1
0
  /**
   * 删除一条记录
   *
   * @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;
  }
コード例 #2
0
  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;
  }