package com.sw.mes.sap.dao;


import com.sw.mes.core.base.BaseDao;
import com.sw.mes.sap.entity.ReportErpInputRecordDetail;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

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

    @Query(value = "SELECT * FROM report_erp_input_record_detail WHERE rid=?1  ", nativeQuery = true)
    List<ReportErpInputRecordDetail> findRecordDetail(Long id);

    @Modifying
    @Query(value = "UPDATE report_erp_input_record_detail set pushed = 1 WHERE rid=?1  ", nativeQuery = true)
    void updateAll(Long id);
}