package com.ruoyi.ems.service.impl;

import com.ruoyi.ems.domain.ElecValencyType;
import com.ruoyi.ems.mapper.ElecValencyTypeMapper;
import com.ruoyi.ems.service.IElecValencyTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 电价计量分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-29
 */
@Service
public class ElecValencyTypeServiceImpl implements IElecValencyTypeService
{
    @Autowired
    private ElecValencyTypeMapper elecValencyTypeMapper;

    /**
     * 查询电价计量分类
     * 
     * @param id 电价计量分类主键
     * @return 电价计量分类
     */
    @Override
    public ElecValencyType selectElecValencyTypeById(Long id)
    {
        return elecValencyTypeMapper.selectElecValencyTypeById(id);
    }

    /**
     * 查询电价计量分类列表
     * 
     * @param elecValencyType 电价计量分类
     * @return 电价计量分类
     */
    @Override
    public List<ElecValencyType> selectElecValencyTypeList(ElecValencyType elecValencyType)
    {
        return elecValencyTypeMapper.selectElecValencyTypeList(elecValencyType);
    }

    /**
     * 新增电价计量分类
     * 
     * @param elecValencyType 电价计量分类
     * @return 结果
     */
    @Override
    public int insertElecValencyType(ElecValencyType elecValencyType)
    {
        return elecValencyTypeMapper.insertElecValencyType(elecValencyType);
    }

    /**
     * 修改电价计量分类
     * 
     * @param elecValencyType 电价计量分类
     * @return 结果
     */
    @Override
    public int updateElecValencyType(ElecValencyType elecValencyType)
    {
        return elecValencyTypeMapper.updateElecValencyType(elecValencyType);
    }

    /**
     * 批量删除电价计量分类
     * 
     * @param ids 需要删除的电价计量分类主键
     * @return 结果
     */
    @Override
    public int deleteElecValencyTypeByIds(Long[] ids)
    {
        return elecValencyTypeMapper.deleteElecValencyTypeByIds(ids);
    }

    /**
     * 删除电价计量分类信息
     * 
     * @param id 电价计量分类主键
     * @return 结果
     */
    @Override
    public int deleteElecValencyTypeById(Long id)
    {
        return elecValencyTypeMapper.deleteElecValencyTypeById(id);
    }
}
