Commit 840419e4 by Javier Ferreira

filtro personas con experencia mayor a un año

parent 4b088c46
package com.roshka.controller;
import java.util.List;
import javax.validation.ConstraintViolationException;
import com.roshka.modelo.Disponibilidad;
......@@ -18,6 +20,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.*;
@Controller
public class PostulanteController {
@Autowired
......@@ -28,7 +32,12 @@ public class PostulanteController {
@RequestMapping("/")
public String index() {
return "index";
List<Postulante> j= post.personasConExperienciaMayor(30);
for (Postulante postulante : j) {
System.out.println(postulante.getNombre());
}
return "index";
}
@RequestMapping("/postulante")
......
......@@ -16,6 +16,5 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
"group by p.id" +
"having sum(fecha_hasta-fecha_desde)>?1 * INTERVAL '1' month",
nativeQuery = true )
public List<Postulante> personasConExperienciaMayor(long meses);
public List<Postulante> personasConExperienciaMayor(long meses);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment