@RequestMapping(value = "/remainNumbers/delete", method = RequestMethod.DELETE) public ResponseEntity<Object> deleteRemainNumbers() { mySQLRepo.deleteRemainNumbers(); JSONObject obj = new JSONObject(); obj.put("notification", "Success"); return new ResponseEntity<Object>(obj.toString(), HttpStatus.OK); }
@RequestMapping(value = "/historyNumbers") public ResponseEntity<Object> historyNumbers() { mySQLRepo.insertHistory(); JSONObject obj = new JSONObject(); obj.put("notification", "Success"); return new ResponseEntity<Object>(obj.toString(), HttpStatus.OK); }
@RequestMapping(value = "/todayNumbers/insert/{rollId}/{rollNumber}", method = RequestMethod.POST) public ResponseEntity<Object> insertTodayNumbers( @PathVariable("rollId") Integer rollId, @PathVariable("rollNumber") Integer rollNumber) { mySQLRepo.insertTodayNumbers(rollId, rollNumber); JSONObject obj = new JSONObject(); obj.put("notification", "Success"); obj.put("rollNumber", rollNumber); return new ResponseEntity<Object>(obj.toString(), HttpStatus.OK); }
@RequestMapping(value = "/remainNumbers") public ResponseEntity<List<RemainNumbers>> remainingNumbers() { List<RemainNumbers> list = mySQLRepo.remainingNumbers(); return new ResponseEntity<List<RemainNumbers>>(list, HttpStatus.OK); }
@RequestMapping(value = "/fullSearch") public ResponseEntity<List<FullSearch>> fullSearch() { List<FullSearch> list = mySQLRepo.getAll(); return new ResponseEntity<List<FullSearch>>(list, HttpStatus.OK); }