package com.sw.mes.yb.pc.dao;

import com.sw.mes.core.base.BaseDao;
import com.sw.mes.yb.pc.entity.CrucibleCheckDataItem;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface CrucibleCheckDataItemDAO extends BaseDao<CrucibleCheckDataItem, Long> {

    List<CrucibleCheckDataItem> findByCheckData_Id(Long checkDataId);

    @Modifying
    @Transactional
    @Query(value = "DELETE FROM zhxx_operate_crucible_check_data_item WHERE check_data_id=?1 ", nativeQuery = true)
    void deleteByCheckDataId(Long checkDataId);
}
