Commit 72be946f by Joel Florentin

merge con experiencia mayor

parents 09c52107 840419e4
package com.roshka.controller;
import java.util.List;
import javax.validation.ConstraintViolationException;
import com.roshka.modelo.Disponibilidad;
......@@ -23,6 +25,8 @@ import java.util.List;
import java.util.Locale;
@Controller
public class PostulanteController {
@Autowired
......@@ -33,7 +37,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("/postulantes")
......
......@@ -24,4 +24,10 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
"WHERE t.id = ?1")
public List<Postulante> buscarPostulantesPorTecnologia(long tecnologiaId);
@Query(value = "select p" +
"from postulante p join experiencia x on x.postulante_id= p.id" +
"group by p.id" +
"having sum(fecha_hasta-fecha_desde)>?1 * INTERVAL '1' month",
nativeQuery = true )
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