@RequestMapping("/list") public Object list(Dest dest) { System.out.println("list"); Map<String, Object> result = new HashMap<String, Object>(); /* result.put("pageNo", pageNo); int totalCount = boardService.countAll(); int lastPageNo = totalCount / pageSize; if ((totalCount % pageSize) > 0) { lastPageNo++; } if (pageNo < lastPageNo) { // 다음 페이지가 있다면 result.put("isNextPage", true); } else { result.put("isNextPage", false); } result.put("pageSize", pageSize);*/ result.put("data", destService.list(dest)); return result; }
@RequestMapping("/listPartiSelect") public Object listPartiSelect(Dest dest) { System.out.println("listPartiSelect"); Map<String, Object> result = new HashMap<String, Object>(); result.put("data", destService.listPartiSelect(dest)); System.out.println(result); return result; }
@RequestMapping("/specList") public Object specList(@RequestParam(required = true) int compNo) { System.out.println("specList...controller"); System.out.println("compNo:" + compNo); Map<String, Object> result = new HashMap<String, Object>(); result.put("data", destService.specList(compNo)); return result; }
@RequestMapping("/delete") public Object delete(Dest dest) { int count = destService.delete(dest); Map<String, Object> result = new HashMap<String, Object>(); if (count > 0) { result.put("data", "success"); } else { result.put("data", "failure"); } return result; }
@RequestMapping("/insert") public Object insert(Dest dest) throws Exception { int count = destService.insert(dest); Map<String, Object> result = new HashMap<String, Object>(); if (count > 0) { result.put("data", "success"); } else { result.put("data", "failure"); } return result; }
@RequestMapping("/listPermision") public Object listPermision(Dest dest) { System.out.println("listPermision"); Map<String, Object> result = new HashMap<String, Object>(); List<Dest> list = destService.listPermision(dest); if (list.size() == 0) { result.put("result", "no"); } else { result.put("result", "yes"); } result.put("data", list); return result; }