package com.ruoyi.ems.service.impl;

import com.ruoyi.ems.domain.OpEnergyStrategyStep;
import com.ruoyi.ems.mapper.OpEnergyStrategyStepMapper;
import com.ruoyi.ems.service.IOpEnergyStrategyStepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 能源策略步骤Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-14
 */
@Service
public class OpEnergyStrategyStepServiceImpl implements IOpEnergyStrategyStepService {
    @Autowired
    private OpEnergyStrategyStepMapper stepMapper;

    @Override
    public List<OpEnergyStrategyStep> selectStepsByStrategyCode(String strategyCode) {
        return stepMapper.selectStepByStrategyCode(strategyCode);
    }

    @Override
    public List<OpEnergyStrategyStep> selectStepByStrategyCode(String strategyCode) {
        return stepMapper.selectStepByStrategyCode(strategyCode);
    }

    @Override
    public OpEnergyStrategyStep selectStepById(Long id) {
        return stepMapper.selectStepById(id);
    }

    @Override
    public int insertStep(OpEnergyStrategyStep step) {
        return stepMapper.insertStep(step);
    }

    @Override
    public int updateStep(OpEnergyStrategyStep step) {
        return stepMapper.updateStep(step);
    }

    @Override
    public int deleteStep(Long id) {
        return stepMapper.deleteStepById(id);
    }

    @Override
    public int deleteStepByIds(Long[] ids) {
        return stepMapper.deleteStepByIds(ids);
    }

    @Override
    public int deleteStepByStrategyCode(String strategyCode) {
        return stepMapper.deleteStepByStrategyCode(strategyCode);
    }

    @Override
    public int insertStepBatch(List<OpEnergyStrategyStep> steps) {
        return stepMapper.insertStepBatch(steps);
    }

    @Override
    public List<OpEnergyStrategyStep> selectStepsByParentCode(String strategyCode, String parentStepCode) {
        return stepMapper.selectStepsByParentCode(strategyCode, parentStepCode);
    }
}
