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

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.sw.mes.core.base.BaseDao;
import com.sw.mes.yb.production.entity.BlastFurnaceDetailLog;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author
 * @Description：
 * @Date:
 * @Modified By:
 */
public interface BlastFurnaceDetailLogDao extends BaseDao<BlastFurnaceDetailLog, Long> {

	@Transactional
	@Modifying
	@Query(value = "delete from production_blast_furnace_detail_log where blast_furnace_id= ?1", nativeQuery = true)
	void deleteByBlastFurnaceId(Long loadingTaskLogId);

	@Query(value = "select * from production_blast_furnace_detail_log where blast_furnace_id= ?1 ", nativeQuery = true)
	List<BlastFurnaceDetailLog> findByBlastFurnaceId(Long id);
}
