|
|
@@ -7,6 +7,7 @@ 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.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -23,6 +24,7 @@ public interface ProductMatchResultDao extends JpaRepository<ProductMatchResult,
|
|
|
*
|
|
|
* @param productIds 物料的主键
|
|
|
*/
|
|
|
+ @Transactional
|
|
|
@Modifying
|
|
|
@Query(value = "delete from ProductMatchResult p where p.prid in (:productIds)")
|
|
|
void deleteByProductids(@Param("productIds") List<Long> productIds);
|
|
|
@@ -32,6 +34,7 @@ public interface ProductMatchResultDao extends JpaRepository<ProductMatchResult,
|
|
|
*
|
|
|
* @param prid 物料的id
|
|
|
*/
|
|
|
+ @Transactional
|
|
|
@Modifying
|
|
|
@Query(value = "delete from ProductMatchResult p where p.prid = :prid")
|
|
|
void deleteByProductid(@Param("prid") Long prid);
|