package com.ruoyi.base.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.base.mapper.RobotOpsBroadcastTaskMapper;
import com.ruoyi.base.domain.RobotOpsBroadcastTask;
import com.ruoyi.base.service.IRobotOpsBroadcastTaskService;

/**
 * 播报任务Service业务层处理
 * 
 * @author ruoyi
 * @date 2026-04-27
 */
@Service
public class RobotOpsBroadcastTaskServiceImpl implements IRobotOpsBroadcastTaskService 
{
    @Autowired
    private RobotOpsBroadcastTaskMapper robotOpsBroadcastTaskMapper;

    /**
     * 查询播报任务
     * 
     * @param id 播报任务主键
     * @return 播报任务
     */
    @Override
    public RobotOpsBroadcastTask selectRobotOpsBroadcastTaskById(Long id)
    {
        return robotOpsBroadcastTaskMapper.selectRobotOpsBroadcastTaskById(id);
    }

    /**
     * 查询播报任务列表
     * 
     * @param robotOpsBroadcastTask 播报任务
     * @return 播报任务
     */
    @Override
    public List<RobotOpsBroadcastTask> selectRobotOpsBroadcastTaskList(RobotOpsBroadcastTask robotOpsBroadcastTask)
    {
        return robotOpsBroadcastTaskMapper.selectRobotOpsBroadcastTaskList(robotOpsBroadcastTask);
    }

    /**
     * 新增播报任务
     * 
     * @param robotOpsBroadcastTask 播报任务
     * @return 结果
     */
    @Override
    public int insertRobotOpsBroadcastTask(RobotOpsBroadcastTask robotOpsBroadcastTask)
    {
        robotOpsBroadcastTask.setCreateTime(DateUtils.getNowDate());
        return robotOpsBroadcastTaskMapper.insertRobotOpsBroadcastTask(robotOpsBroadcastTask);
    }

    /**
     * 修改播报任务
     * 
     * @param robotOpsBroadcastTask 播报任务
     * @return 结果
     */
    @Override
    public int updateRobotOpsBroadcastTask(RobotOpsBroadcastTask robotOpsBroadcastTask)
    {
        robotOpsBroadcastTask.setUpdateTime(DateUtils.getNowDate());
        return robotOpsBroadcastTaskMapper.updateRobotOpsBroadcastTask(robotOpsBroadcastTask);
    }

    /**
     * 批量删除播报任务
     * 
     * @param ids 需要删除的播报任务主键
     * @return 结果
     */
    @Override
    public int deleteRobotOpsBroadcastTaskByIds(Long[] ids)
    {
        return robotOpsBroadcastTaskMapper.deleteRobotOpsBroadcastTaskByIds(ids);
    }

    /**
     * 删除播报任务信息
     * 
     * @param id 播报任务主键
     * @return 结果
     */
    @Override
    public int deleteRobotOpsBroadcastTaskById(Long id)
    {
        return robotOpsBroadcastTaskMapper.deleteRobotOpsBroadcastTaskById(id);
    }
}
