package com.phm.manage.service.impl;

import com.phm.manage.domain.InstructionInfo;
import com.phm.manage.mapper.InstructionInfoMapper;
import com.phm.manage.service.IInstructionInfoService;
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 InstructionInfoServiceImpl implements IInstructionInfoService {
    @Autowired
    private InstructionInfoMapper instructionInfoMapper;

    /**
     * 查询指令信息
     *
     * @param id 指令信息主键
     * @return 指令信息
     */
    @Override
    public InstructionInfo selectInstructionInfoById(Long id) {
        return instructionInfoMapper.selectInstructionInfoById(id);
    }

    /**
     * 查询指令信息列表
     *
     * @param instructionInfo 指令信息
     * @return 指令信息
     */
    @Override
    public List<InstructionInfo> selectInstructionInfoList(InstructionInfo instructionInfo) {
        return instructionInfoMapper.selectInstructionInfoList(instructionInfo);
    }

    /**
     * 新增指令信息
     *
     * @param instructionInfo 指令信息
     * @return 结果
     */
    @Override
    public int insertInstructionInfo(InstructionInfo instructionInfo) {
        return instructionInfoMapper.insertInstructionInfo(instructionInfo);
    }

    /**
     * 修改指令信息
     *
     * @param instructionInfo 指令信息
     * @return 结果
     */
    @Override
    public int updateInstructionInfo(InstructionInfo instructionInfo) {
        return instructionInfoMapper.updateInstructionInfo(instructionInfo);
    }

    /**
     * 批量删除指令信息
     *
     * @param ids 需要删除的指令信息主键
     * @return 结果
     */
    @Override
    public int deleteInstructionInfoByIds(Long[] ids) {
        return instructionInfoMapper.deleteInstructionInfoByIds(ids);
    }

    /**
     * 删除指令信息信息
     *
     * @param id 指令信息主键
     * @return 结果
     */
    @Override
    public int deleteInstructionInfoById(Long id) {
        return instructionInfoMapper.deleteInstructionInfoById(id);
    }
}
