@RequestMapping(value = "/1/boards", method = RequestMethod.POST) @ResponseBody public Object createBoard(HttpServletRequest request) { String boardName = request.getParameter("boardName"); String idOrganization = request.getParameter("idOrganization"); String prefs_permissionLevel = request.getParameter("prefs_permissionLevel"); // 用户唯一标示 String idMemeber = request.getParameter("mail"); if (idMemeber == null || "".equals(idMemeber)) { return "can't get member name"; } try { return boardService.createBoard(boardName, idOrganization, prefs_permissionLevel, idMemeber); } catch (NullMemberException e) { // TODO Auto-generated catch block e.printStackTrace(); log.error(e.getMessage()); return new NullObject(-1001, "null member info"); } }
@RequestMapping("/1/boards/{id}/lists") @ResponseBody public Object getBoardByList(@PathVariable("id") String id) { return boardService.getListByBoard(id); }
@RequestMapping("/1/boards/all") @ResponseBody public Object getBoard() { return boardService.getBoards(); }