Commit 840419e4 by Javier Ferreira

filtro personas con experencia mayor a un año

parent 4b088c46
package com.roshka.controller; package com.roshka.controller;
import java.util.List;
import javax.validation.ConstraintViolationException; import javax.validation.ConstraintViolationException;
import com.roshka.modelo.Disponibilidad; import com.roshka.modelo.Disponibilidad;
...@@ -18,6 +20,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException; ...@@ -18,6 +20,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@Controller @Controller
public class PostulanteController { public class PostulanteController {
@Autowired @Autowired
...@@ -28,6 +32,11 @@ public class PostulanteController { ...@@ -28,6 +32,11 @@ public class PostulanteController {
@RequestMapping("/") @RequestMapping("/")
public String index() { public String index() {
List<Postulante> j= post.personasConExperienciaMayor(30);
for (Postulante postulante : j) {
System.out.println(postulante.getNombre());
}
return "index"; return "index";
} }
......
...@@ -17,5 +17,4 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> { ...@@ -17,5 +17,4 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
"having sum(fecha_hasta-fecha_desde)>?1 * INTERVAL '1' month", "having sum(fecha_hasta-fecha_desde)>?1 * INTERVAL '1' month",
nativeQuery = true ) 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