19 lines
746 B
Java
19 lines
746 B
Java
package com.aiteacher.document;
|
|
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
import org.springframework.data.jpa.repository.Query;
|
|
import org.springframework.data.repository.query.Param;
|
|
|
|
import java.util.List;
|
|
import java.util.UUID;
|
|
|
|
public interface ChunkFigureRefRepository extends JpaRepository<ChunkFigureRefEntity, ChunkFigureRefEntity.PK> {
|
|
|
|
@Query("SELECT r FROM ChunkFigureRefEntity r WHERE r.chunkId IN :chunkIds")
|
|
List<ChunkFigureRefEntity> findByChunkIdIn(@Param("chunkIds") List<UUID> chunkIds);
|
|
|
|
@Query("DELETE FROM ChunkFigureRefEntity r WHERE r.figureId IN :figureIds")
|
|
@org.springframework.data.jpa.repository.Modifying
|
|
void deleteByFigureIdIn(@Param("figureIds") List<String> figureIds);
|
|
}
|