package com.izouma.nineth.repo; import com.izouma.nineth.domain.MetaShowRoomAsset; 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 javax.transaction.Transactional; import java.util.List; public interface MetaShowRoomAssetRepo extends JpaRepository, JpaSpecificationExecutor { @Modifying @Transactional void deleteByShowRoomIdAndAssetId(Long showRoomId, Long assetId); @Modifying @Transactional void deleteByShowRoomId(Long showRoomId); List findAllByShowRoomId(Long showRoomId); @Query("select s.assetId from MetaShowRoomAsset s where s.del = false and s.userId = ?1") List findAssetIdAllByUserId(Long userId); @Modifying @Transactional void deleteByAssetId(Long assetId); }