yaozc
2023-02-21 744ddc3550c2bdbe61f7326e4ab7c00dfa3ac51f
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/repository/ProjectProgressRepository.java
@@ -19,6 +19,7 @@
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import java.sql.Timestamp;
@@ -56,4 +57,12 @@
   @Query(value = "SELECT distinct belong_week FROM project_progress WHERE belong_year = ?1", nativeQuery = true)
   List<Integer> findAllBelongWeekByBelongYear(Integer year);
    /**
     * 根据项目ID删除
     * @param projectId
     */
    @Modifying
    @Query(value = "DELETE FROM project_progress WHERE project_id = ?1", nativeQuery = true)
    void deleteByProjectId(Long projectId);
}