package com.phm.manage.service.impl;

import com.phm.manage.domain.ForecastModel;
import com.phm.manage.mapper.ForecastModelMapper;
import com.phm.manage.service.IForecastModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 预测模型信息Service业务层处理
 *
 * @author phm
 * @date 2023-08-22
 */
@Service
public class ForecastModelServiceImpl implements IForecastModelService {
    @Autowired
    private ForecastModelMapper forecastModelMapper;

    /**
     * 查询预测模型信息
     *
     * @param id 预测模型信息主键
     * @return 预测模型信息
     */
    @Override
    public ForecastModel selectForecastModelById(Long id) {
        return forecastModelMapper.selectForecastModelById(id);
    }

    /**
     * 查询预测模型信息列表
     *
     * @param forecastModel 预测模型信息
     * @return 预测模型信息
     */
    @Override
    public List<ForecastModel> selectForecastModelList(ForecastModel forecastModel) {
        return forecastModelMapper.selectForecastModelList(forecastModel);
    }

    /**
     * 新增预测模型信息
     *
     * @param forecastModel 预测模型信息
     * @return 结果
     */
    @Override
    public int insertForecastModel(ForecastModel forecastModel) {
        return forecastModelMapper.insertForecastModel(forecastModel);
    }

    /**
     * 修改预测模型信息
     *
     * @param forecastModel 预测模型信息
     * @return 结果
     */
    @Override
    public int updateForecastModel(ForecastModel forecastModel) {
        return forecastModelMapper.updateForecastModel(forecastModel);
    }

    /**
     * 批量删除预测模型信息
     *
     * @param ids 需要删除的预测模型信息主键
     * @return 结果
     */
    @Override
    public int deleteForecastModelByIds(Long[] ids) {
        return forecastModelMapper.deleteForecastModelByIds(ids);
    }

    /**
     * 删除预测模型信息信息
     *
     * @param id 预测模型信息主键
     * @return 结果
     */
    @Override
    public int deleteForecastModelById(Long id) {
        return forecastModelMapper.deleteForecastModelById(id);
    }
}
