package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RmRegistrationMachineMapper;
import com.ruoyi.system.domain.RmRegistrationMachine;
import com.ruoyi.system.service.IRmRegistrationMachineService;

/**
 * 绑定金山machinecodeService业务层处理
 * 
 * @author gyt
 * @date 2025-10-10
 */
@Service
public class RmRegistrationMachineServiceImpl implements IRmRegistrationMachineService 
{
    @Autowired
    private RmRegistrationMachineMapper rmRegistrationMachineMapper;

    /**
     * 查询绑定金山machinecode
     * 
     * @param id 绑定金山machinecode主键
     * @return 绑定金山machinecode
     */
    @Override
    public RmRegistrationMachine selectRmRegistrationMachineById(Long id)
    {
        return rmRegistrationMachineMapper.selectRmRegistrationMachineById(id);
    }

    /**
     * 查询绑定金山machinecode列表
     * 
     * @param rmRegistrationMachine 绑定金山machinecode
     * @return 绑定金山machinecode
     */
    @Override
    public List<RmRegistrationMachine> selectRmRegistrationMachineList(RmRegistrationMachine rmRegistrationMachine)
    {
        return rmRegistrationMachineMapper.selectRmRegistrationMachineList(rmRegistrationMachine);
    }

    /**
     * 新增绑定金山machinecode
     * 
     * @param rmRegistrationMachine 绑定金山machinecode
     * @return 结果
     */
    @Override
    public int insertRmRegistrationMachine(RmRegistrationMachine rmRegistrationMachine)
    {
        rmRegistrationMachine.setCreateTime(DateUtils.getNowDate());
        return rmRegistrationMachineMapper.insertRmRegistrationMachine(rmRegistrationMachine);
    }

    /**
     * 修改绑定金山machinecode
     * 
     * @param rmRegistrationMachine 绑定金山machinecode
     * @return 结果
     */
    @Override
    public int updateRmRegistrationMachine(RmRegistrationMachine rmRegistrationMachine)
    {
        rmRegistrationMachine.setUpdateTime(DateUtils.getNowDate());
        return rmRegistrationMachineMapper.updateRmRegistrationMachine(rmRegistrationMachine);
    }

    /**
     * 批量删除绑定金山machinecode
     * 
     * @param ids 需要删除的绑定金山machinecode主键
     * @return 结果
     */
    @Override
    public int deleteRmRegistrationMachineByIds(Long[] ids)
    {
        return rmRegistrationMachineMapper.deleteRmRegistrationMachineByIds(ids);
    }

    /**
     * 删除绑定金山machinecode信息
     * 
     * @param id 绑定金山machinecode主键
     * @return 结果
     */
    @Override
    public int deleteRmRegistrationMachineById(Long id)
    {
        return rmRegistrationMachineMapper.deleteRmRegistrationMachineById(id);
    }
}
