@RequestMapping("find") public ResponseEntity<List<Label>> findLabelByUser(@RequestParam String client_id) { User user = new User(); user.setClient_id(client_id); List<Label> labels = labelDao.findLabelByUser(user); return new ResponseEntity<List<Label>>(labels, HttpStatus.OK); }
@RequestMapping("add") public String addLabe(@RequestParam String labelname) { Label label = new Label(); label.setLabel_name(labelname); label.setCreated_at(new Date()); label.setId(202); labelDao.save(label); return "SUCCESS"; }
@RequestMapping("label") public ResponseEntity<List<Label>> findLabel(@RequestParam String labelname) { List<Label> labels = labelDao.findLabelByName(labelname); return new ResponseEntity<List<Label>>(labels, HttpStatus.OK); }