|
@@ -10,9 +10,18 @@ package cn.com.qmth.examcloud.core.print.repository;
|
|
import cn.com.qmth.examcloud.core.print.entity.ProjectBackupSetting;
|
|
import cn.com.qmth.examcloud.core.print.entity.ProjectBackupSetting;
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
|
|
+import org.springframework.data.jpa.repository.Modifying;
|
|
|
|
+import org.springframework.data.jpa.repository.Query;
|
|
|
|
+import org.springframework.data.repository.query.Param;
|
|
import org.springframework.stereotype.Repository;
|
|
import org.springframework.stereotype.Repository;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
@Repository
|
|
@Repository
|
|
public interface ProjectBackupSettingRepository extends JpaRepository<ProjectBackupSetting, Long>, JpaSpecificationExecutor<ProjectBackupSetting> {
|
|
public interface ProjectBackupSettingRepository extends JpaRepository<ProjectBackupSetting, Long>, JpaSpecificationExecutor<ProjectBackupSetting> {
|
|
|
|
|
|
|
|
+ @Transactional
|
|
|
|
+ @Modifying
|
|
|
|
+ @Query("delete from ProjectBackupSetting where projectId=:projectId")
|
|
|
|
+ int deleteByProjectId(@Param("projectId") Long projectId);
|
|
|
|
+
|
|
}
|
|
}
|