package com.ruoyi.ems.service.impl;

import com.ruoyi.ems.domain.ElecPriceType;
import com.ruoyi.ems.mapper.ElecPriceTypeMapper;
import com.ruoyi.ems.service.IElecPriceTypeService;
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 ElecPriceTypeServiceImpl implements IElecPriceTypeService {
    @Autowired
    private ElecPriceTypeMapper elecPriceTypeMapper;

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

    /**
     * 查询电价计量分类列表
     *
     * @param elecPriceType 电价计量分类
     * @return 电价计量分类
     */
    @Override
    public List<ElecPriceType> selectElecPriceTypeList(ElecPriceType elecPriceType) {
        return elecPriceTypeMapper.selectElecPriceTypeList(elecPriceType);
    }

    /**
     * 新增电价计量分类
     *
     * @param elecPriceType 电价计量分类
     * @return 结果
     */
    @Override
    public int insertElecPriceType(ElecPriceType elecPriceType) {
        return elecPriceTypeMapper.insertElecPriceType(elecPriceType);
    }

    /**
     * 修改电价计量分类
     *
     * @param elecPriceType 电价计量分类
     * @return 结果
     */
    @Override
    public int updateElecPriceType(ElecPriceType elecPriceType) {
        return elecPriceTypeMapper.updateElecPriceType(elecPriceType);
    }

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

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