@RequestMapping( value = "/deleteBorrower", method = {RequestMethod.GET, RequestMethod.POST}, consumes = "application/json") public List<Borrower> deleteBorrower(@RequestBody Borrower borrower) { borrowerdao.deleteBorrower(borrower); return borrowerdao.getAllBorrowers(1, 5); }
@RequestMapping( value = "/getBorrowersCount", method = {RequestMethod.GET, RequestMethod.POST}, produces = "application/json") public int getBorrowersCount() { return borrowerdao.getBorrowersCount(); }
@RequestMapping( value = "/editBorrower", method = {RequestMethod.GET, RequestMethod.POST}, consumes = "application/json") public void editBorrower(@RequestBody List<Borrower> borrowers) { for (Borrower borrower : borrowers) borrowerdao.updateBorrower(borrower); }
/*Admin Borrower*/ @RequestMapping( value = "/getBorrowers/{pageNo}/{pageSize}", method = {RequestMethod.GET, RequestMethod.POST}, produces = "application/json") public List<Borrower> getBorrowers(@PathVariable int pageNo, @PathVariable int pageSize) { return borrowerdao.getAllBorrowers(pageNo, pageSize); }