| | |
| | | */ |
| | | package me.zhengjie.modules.project.repository; |
| | | |
| | | import me.zhengjie.modules.project.domain.Project; |
| | | import me.zhengjie.modules.project.domain.ProjectTask; |
| | | import me.zhengjie.modules.project.domain.ProjectTaskSummary; |
| | | |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; |
| | | import org.springframework.data.jpa.repository.Query; |
| | |
| | | |
| | | @Query(value = "SELECT * FROM project_task WHERE project_id = ?1", nativeQuery = true) |
| | | List<ProjectTask> findByProjectId(Long id); |
| | | |
| | | @Query(value = "SELECT MIN(plan_start_time) AS taskStartDate, MAX(plan_end_time) AS taskEndDate, COALESCE(SUM(plan_hours), 0) AS totalTaskTime FROM project_task WHERE project_id = ?1", nativeQuery = true) |
| | | ProjectTaskSummary findSummaryByProjectId(Long id); |
| | | } |