Commit 6b23f1cac19509cb997ba1fb748b7c8a3e3a0063
1 parent
7398996f
Correction /consommation bis
Showing
1 changed file
with
4 additions
and
5 deletions
Show diff stats
src/main/java/etunicorn/controller/PersonneController.java
... | ... | @@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.RequestBody; |
17 | 17 | import org.springframework.web.bind.annotation.RestController; |
18 | 18 | |
19 | 19 | import javax.validation.Valid; |
20 | -import java.math.BigDecimal; | |
21 | 20 | import java.text.ParseException; |
22 | 21 | import java.text.SimpleDateFormat; |
23 | 22 | import java.util.LinkedHashMap; |
... | ... | @@ -101,7 +100,7 @@ public class PersonneController extends BaseController implements etunicorn.gene |
101 | 100 | |
102 | 101 | @Override |
103 | 102 | @RestrictedTo("PERSONNE_GET") |
104 | - public ResponseEntity<?> getPersonneById(@PathVariable BigDecimal idPersonne) { | |
103 | + public ResponseEntity<?> getPersonneById(@PathVariable Long idPersonne) { | |
105 | 104 | Personne personne = personneRepository.findById(idPersonne.intValue()); |
106 | 105 | if (personne == null) { |
107 | 106 | return new ResponseEntity<Object>(HttpStatus.NOT_FOUND); |
... | ... | @@ -111,7 +110,7 @@ public class PersonneController extends BaseController implements etunicorn.gene |
111 | 110 | |
112 | 111 | @Override |
113 | 112 | @RestrictedTo("PERSONNE_EDIT") |
114 | - public ResponseEntity<?> updatePersonneById(@PathVariable BigDecimal idPersonne, @Valid @RequestBody UpdatePersonneByIdRequest updatePersonneByIdRequest) { | |
113 | + public ResponseEntity<?> updatePersonneById(@PathVariable Long idPersonne, @Valid @RequestBody UpdatePersonneByIdRequest updatePersonneByIdRequest) { | |
115 | 114 | Personne personne = personneRepository.findById(idPersonne.intValue()); |
116 | 115 | if (personne == null) { |
117 | 116 | return generateError(HttpStatus.NOT_FOUND, "Personne introuvable"); |
... | ... | @@ -126,7 +125,7 @@ public class PersonneController extends BaseController implements etunicorn.gene |
126 | 125 | |
127 | 126 | @Override |
128 | 127 | @RestrictedTo("PERSONNE_REMOVE") |
129 | - public ResponseEntity<?> deletePersonneById(@PathVariable BigDecimal idPersonne) { | |
128 | + public ResponseEntity<?> deletePersonneById(@PathVariable Long idPersonne) { | |
130 | 129 | Personne personne = personneRepository.findById(idPersonne.intValue()); |
131 | 130 | |
132 | 131 | if (personne == null) { |
... | ... | @@ -137,7 +136,7 @@ public class PersonneController extends BaseController implements etunicorn.gene |
137 | 136 | } |
138 | 137 | |
139 | 138 | @Override |
140 | - public ResponseEntity<?> updateVirer(@PathVariable BigDecimal idPersonne, @Valid @RequestBody UpdateVirerRequest updateVirerRequest) { | |
139 | + public ResponseEntity<?> updateVirer(@PathVariable Long idPersonne, @Valid @RequestBody UpdateVirerRequest updateVirerRequest) { | |
141 | 140 | return null; |
142 | 141 | } |
143 | 142 | } | ... | ... |