package com.ruoyi.predict.service.impl;

import com.ruoyi.predict.domain.WeatherForecast;
import com.ruoyi.predict.mapper.WeatherForecastMapper;
import com.ruoyi.predict.service.IWeatherForecastService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

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

/**
 * WeatherForecastService业务层处理
 * 
 * @author hlf
 * @date 2022-09-21
 */
@Service
public class WeatherForecastServiceImpl implements IWeatherForecastService 
{
    @Autowired(required = false)
    private WeatherForecastMapper weatherForecastMapper;

    /**
     * 查询WeatherForecast
     * 
     * @param dataTime WeatherForecastID
     * @return WeatherForecast
     */
    @Override
    public WeatherForecast selectWeatherForecastById(Long terminalNumber, Date dataTime)
    {
        return weatherForecastMapper.selectWeatherForecastById(terminalNumber, dataTime);
    }

    /**
     * 查询WeatherForecast列表
     * 
     * @param weatherForecast WeatherForecast
     * @return WeatherForecast
     */
    @Override
    public List<WeatherForecast> selectWeatherForecastList(WeatherForecast weatherForecast)
    {
        return weatherForecastMapper.selectWeatherForecastList(weatherForecast);
    }

    /**
     * 新增WeatherForecast
     * 
     * @param weatherForecast WeatherForecast
     * @return 结果
     */
    @Override
    public int insertWeatherForecast(WeatherForecast weatherForecast)
    {
        return weatherForecastMapper.insertWeatherForecast(weatherForecast);
    }

    /**
     * 修改WeatherForecast
     * 
     * @param weatherForecast WeatherForecast
     * @return 结果
     */
    @Override
    public int updateWeatherForecast(WeatherForecast weatherForecast)
    {
        return weatherForecastMapper.updateWeatherForecast(weatherForecast);
    }
}
