package com.jiayue.ipfcst.common.data.repository;

import com.jiayue.ipfcst.common.data.entity.ManualInterventionData;
import com.jiayue.ipfcst.common.data.entity.ManualInterventionRatioData;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 人工干预数据仓储
 *
 * @author tl
 * @version 3.0
 * @since 2020/9/21 11:02
 */
public interface ManualInterventionRatioDataRepository extends BaseRepository<ManualInterventionRatioData,Integer> {
    @Query(nativeQuery=true, value = "select * from t_manual_intervention_ratio_data where C_INTERVENE_START_TIME >= ?1 AND C_INTERVENE_END_TIME <?2 AND C_INTERVENE_TYPE = ?3 ORDER BY C_INTERVENE_START_TIME ASC ")
    List<ManualInterventionRatioData> findByCreateTimeBetweenAndInterveneType(Long startTime, Long endTime, String interveneType);


    ManualInterventionRatioData queryById(Integer integer);

    void deleteById(Integer id);
}
