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.RobotOpsBroadcastContentMapper;
import com.ruoyi.base.domain.RobotOpsBroadcastContent;
import com.ruoyi.base.service.IRobotOpsBroadcastContentService;

/**
 * 播报内容Service业务层处理
 * 
 * @author ruoyi
 * @date 2026-04-27
 */
@Service
public class RobotOpsBroadcastContentServiceImpl implements IRobotOpsBroadcastContentService 
{
    @Autowired
    private RobotOpsBroadcastContentMapper robotOpsBroadcastContentMapper;

    /**
     * 查询播报内容
     * 
     * @param id 播报内容主键
     * @return 播报内容
     */
    @Override
    public RobotOpsBroadcastContent selectRobotOpsBroadcastContentById(Long id)
    {
        return robotOpsBroadcastContentMapper.selectRobotOpsBroadcastContentById(id);
    }

    /**
     * 查询播报内容列表
     * 
     * @param robotOpsBroadcastContent 播报内容
     * @return 播报内容
     */
    @Override
    public List<RobotOpsBroadcastContent> selectRobotOpsBroadcastContentList(RobotOpsBroadcastContent robotOpsBroadcastContent)
    {
        return robotOpsBroadcastContentMapper.selectRobotOpsBroadcastContentList(robotOpsBroadcastContent);
    }

    /**
     * 新增播报内容
     * 
     * @param robotOpsBroadcastContent 播报内容
     * @return 结果
     */
    @Override
    public int insertRobotOpsBroadcastContent(RobotOpsBroadcastContent robotOpsBroadcastContent)
    {
        robotOpsBroadcastContent.setCreateTime(DateUtils.getNowDate());
        return robotOpsBroadcastContentMapper.insertRobotOpsBroadcastContent(robotOpsBroadcastContent);
    }

    /**
     * 修改播报内容
     * 
     * @param robotOpsBroadcastContent 播报内容
     * @return 结果
     */
    @Override
    public int updateRobotOpsBroadcastContent(RobotOpsBroadcastContent robotOpsBroadcastContent)
    {
        robotOpsBroadcastContent.setUpdateTime(DateUtils.getNowDate());
        return robotOpsBroadcastContentMapper.updateRobotOpsBroadcastContent(robotOpsBroadcastContent);
    }

    /**
     * 批量删除播报内容
     * 
     * @param ids 需要删除的播报内容主键
     * @return 结果
     */
    @Override
    public int deleteRobotOpsBroadcastContentByIds(Long[] ids)
    {
        return robotOpsBroadcastContentMapper.deleteRobotOpsBroadcastContentByIds(ids);
    }

    /**
     * 删除播报内容信息
     * 
     * @param id 播报内容主键
     * @return 结果
     */
    @Override
    public int deleteRobotOpsBroadcastContentById(Long id)
    {
        return robotOpsBroadcastContentMapper.deleteRobotOpsBroadcastContentById(id);
    }
}
