From 6b23f1cac19509cb997ba1fb748b7c8a3e3a0063 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Sun, 5 Feb 2017 23:50:18 +0100 Subject: [PATCH] Correction /consommation bis --- src/main/java/etunicorn/controller/PersonneController.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/etunicorn/controller/PersonneController.java b/src/main/java/etunicorn/controller/PersonneController.java index eb6bff1..bf96139 100644 --- a/src/main/java/etunicorn/controller/PersonneController.java +++ b/src/main/java/etunicorn/controller/PersonneController.java @@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; -import java.math.BigDecimal; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.LinkedHashMap; @@ -101,7 +100,7 @@ public class PersonneController extends BaseController implements etunicorn.gene @Override @RestrictedTo("PERSONNE_GET") - public ResponseEntity getPersonneById(@PathVariable BigDecimal idPersonne) { + public ResponseEntity getPersonneById(@PathVariable Long idPersonne) { Personne personne = personneRepository.findById(idPersonne.intValue()); if (personne == null) { return new ResponseEntity(HttpStatus.NOT_FOUND); @@ -111,7 +110,7 @@ public class PersonneController extends BaseController implements etunicorn.gene @Override @RestrictedTo("PERSONNE_EDIT") - public ResponseEntity updatePersonneById(@PathVariable BigDecimal idPersonne, @Valid @RequestBody UpdatePersonneByIdRequest updatePersonneByIdRequest) { + public ResponseEntity updatePersonneById(@PathVariable Long idPersonne, @Valid @RequestBody UpdatePersonneByIdRequest updatePersonneByIdRequest) { Personne personne = personneRepository.findById(idPersonne.intValue()); if (personne == null) { return generateError(HttpStatus.NOT_FOUND, "Personne introuvable"); @@ -126,7 +125,7 @@ public class PersonneController extends BaseController implements etunicorn.gene @Override @RestrictedTo("PERSONNE_REMOVE") - public ResponseEntity deletePersonneById(@PathVariable BigDecimal idPersonne) { + public ResponseEntity deletePersonneById(@PathVariable Long idPersonne) { Personne personne = personneRepository.findById(idPersonne.intValue()); if (personne == null) { @@ -137,7 +136,7 @@ public class PersonneController extends BaseController implements etunicorn.gene } @Override - public ResponseEntity updateVirer(@PathVariable BigDecimal idPersonne, @Valid @RequestBody UpdateVirerRequest updateVirerRequest) { + public ResponseEntity updateVirer(@PathVariable Long idPersonne, @Valid @RequestBody UpdateVirerRequest updateVirerRequest) { return null; } } -- libgit2 0.21.2