añadimos el apartado de pujas, para que se puedan ver las pujas y poder crear el informe
Some checks failed
Deploy Spring Boot App / build-and-deploy (push) Has been cancelled
Some checks failed
Deploy Spring Boot App / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -20,16 +20,31 @@ public class PujaController {
|
||||
return pujaService.findAll();
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@GetMapping("/id/{id}")
|
||||
public ResponseEntity<Puja> getById(@PathVariable Long id) {
|
||||
return pujaService.findById(id)
|
||||
.map(ResponseEntity::ok)
|
||||
.orElse(ResponseEntity.notFound().build());
|
||||
}
|
||||
|
||||
@GetMapping("/informe/{remateId}")
|
||||
public List<Puja> getForInforme(@PathVariable Long remateId){
|
||||
return pujaService.fingForReporte(remateId);
|
||||
}
|
||||
@GetMapping("/remate/{id}")
|
||||
public List<Puja> getForRemate(@PathVariable Long id){
|
||||
return pujaService.findForRemtae(id);
|
||||
}
|
||||
|
||||
//get coincidir con lote y remate
|
||||
@GetMapping("/loteyremate/{loteId}/{remateId}")
|
||||
public List<Puja> getForLoteAndRemate(@PathVariable Long loteId,@PathVariable Long remateId){
|
||||
return pujaService.findForLoteAndRemate(loteId,remateId);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public Puja create(@RequestBody Puja remate) {
|
||||
return pujaService.save(remate);
|
||||
public Puja create(@RequestBody Puja puja) {
|
||||
return pujaService.save(puja);
|
||||
}
|
||||
|
||||
@PutMapping("/{id}")
|
||||
|
||||
Reference in New Issue
Block a user