package com.gyee.alarm.mapper.auto;

import com.gyee.alarm.model.auto.ProEconEarlyReport;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 预警报告 Mapper 接口
 * </p>
 *
 * @author shilin
 * @since 2023-09-05
 */
public interface ProEconEarlyReportMapper extends BaseMapper<ProEconEarlyReport> {


    @Select("select * from pro_econ_early_report where report_date>#{startTime} and report_date<=#{endTime}")
    @Results({
            @Result(id = true, column = "id", property = "id"),
            @Result(
                    property = "proEconEarlyReportWtList",
                    column = "id",
                    javaType = List.class,
                    many = @Many(select = "com.gyee.alarm.mapper.auto.ProEconEarlyReportWtMapper.findByReportId")

            )})
    List<ProEconEarlyReport> findEarlyReportByDate(@Param("stationId")String stationId, @Param("startTime") Date startTime, @Param("endTime")Date endTime);
}
