package com.ruoyi.ems.service.impl;

import java.util.List;

import com.ruoyi.ems.domain.ElecValencyConfig;
import com.ruoyi.ems.mapper.ElecValencyConfigMapper;
import com.ruoyi.ems.service.IElecValencyConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 电价配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-23
 */
@Service
public class ElecValencyConfigServiceImpl implements IElecValencyConfigService
{
    @Autowired
    private ElecValencyConfigMapper elecValencyConfigMapper;

    /**
     * 查询电价配置
     * 
     * @param id 电价配置主键
     * @return 电价配置
     */
    @Override
    public ElecValencyConfig selectElecValencyConfigById(Long id)
    {
        return elecValencyConfigMapper.selectElecValencyConfigById(id);
    }

    /**
     * 查询电价配置列表
     * 
     * @param elecValencyConfig 电价配置
     * @return 电价配置
     */
    @Override
    public List<ElecValencyConfig> selectElecValencyConfigList(ElecValencyConfig elecValencyConfig)
    {
        return elecValencyConfigMapper.selectElecValencyConfigList(elecValencyConfig);
    }

    /**
     * 新增电价配置
     * 
     * @param elecValencyConfig 电价配置
     * @return 结果
     */
    @Override
    public int insertElecValencyConfig(ElecValencyConfig elecValencyConfig)
    {
        return elecValencyConfigMapper.insertElecValencyConfig(elecValencyConfig);
    }

    /**
     * 修改电价配置
     * 
     * @param elecValencyConfig 电价配置
     * @return 结果
     */
    @Override
    public int updateElecValencyConfig(ElecValencyConfig elecValencyConfig)
    {
        return elecValencyConfigMapper.updateElecValencyConfig(elecValencyConfig);
    }

    /**
     * 批量删除电价配置
     * 
     * @param ids 需要删除的电价配置主键
     * @return 结果
     */
    @Override
    public int deleteElecValencyConfigByIds(Long[] ids)
    {
        return elecValencyConfigMapper.deleteElecValencyConfigByIds(ids);
    }

    /**
     * 删除电价配置信息
     * 
     * @param id 电价配置主键
     * @return 结果
     */
    @Override
    public int deleteElecValencyConfigById(Long id)
    {
        return elecValencyConfigMapper.deleteElecValencyConfigById(id);
    }
}
