Ejemplo n.º 1
0
  private void btnSave(Long[] ids, Long[] sortIds) {
    if (null == ids || null == sortIds || ids.length < 1 || sortIds.length < 1) {
      return;
    }

    for (int i = 0; i < ids.length; i++) {
      Long id = ids[i];

      TdManager e = tdManagerService.findOne(id);

      if (null != e) {
        if (sortIds.length > i) {
          e.setSortId(sortIds[i]);
          tdManagerService.save(e);
        }
      }
    }
  }
Ejemplo n.º 2
0
  @RequestMapping(value = "/save")
  public String orderEdit(
      TdManager tdManager, String __VIEWSTATE, ModelMap map, HttpServletRequest req) {
    String username = (String) req.getSession().getAttribute("manager");
    if (null == username) {
      return "redirect:/Verwalter/login";
    }

    map.addAttribute("__VIEWSTATE", __VIEWSTATE);

    if (null == tdManager.getId()) {
      tdManagerLogService.addLog("add", "修改管理员", req);
    } else {
      tdManagerLogService.addLog("edit", "修改管理员", req);
    }

    tdManagerService.save(tdManager);

    return "redirect:/Verwalter/manager/list";
  }