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

This commit is contained in:
2025-11-22 12:09:17 -04:00
parent 5f2942f700
commit 0e65f8dae6
12 changed files with 436 additions and 7 deletions

View File

@@ -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}")