package com.jiayue.insu.inclientqn.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiayue.insu.inclientqn.entity.BackForeForecastData;
import com.jiayue.insu.inclientqn.entity.BackForeUsForecastData;
import com.jiayue.insu.inclientqn.mapper.BackForeForecastDataMapper;
import com.jiayue.insu.inclientqn.service.BackForeForecastDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 修正数据业务实现
 *
 * @author yh
 * @version 1.0
 * @since 2022/5/22 11:29
 */
@Service
@Slf4j
public class BackForeForecastDataServiceImpl extends ServiceImpl<BackForeForecastDataMapper, BackForeForecastData> implements BackForeForecastDataService {


    @Override
    public List<BackForeForecastData> findBySignTime(LocalDateTime time) {
        LambdaQueryWrapper<BackForeForecastData> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(BackForeForecastData::getSignTime,time);
        return this.list(lambdaQueryWrapper);
    }

    @Override
    public List<BackForeForecastData> findBySignTimeAndStationCode(LocalDateTime time, String stationCode) {
        LambdaQueryWrapper<BackForeForecastData> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(BackForeForecastData::getSignTime,time);
        lambdaQueryWrapper.eq(BackForeForecastData::getStationCode,stationCode);
        return this.list(lambdaQueryWrapper);
    }
}
