package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.mapper.PushMessageMapper;
import com.ruoyi.system.domain.PushMessage;
import com.ruoyi.system.service.IPushMessageService;

/**
 * 推送消息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-08-01
 */
@Service
public class PushMessageServiceImpl extends ServiceImpl<BaseMapper<PushMessage>,PushMessage> implements IPushMessageService
{
    @Autowired
    private PushMessageMapper pushMessageMapper;

    /**
     * 查询推送消息
     *
     * @param id 推送消息主键
     * @return 推送消息
     */
    @Override
    public PushMessage selectPushMessageById(Long id)
    {
        return pushMessageMapper.selectPushMessageById(id);
    }

    /**
     * 查询推送消息列表
     *
     * @param pushMessage 推送消息
     * @return 推送消息
     */
    @Override
    public List<PushMessage> selectPushMessageList(PushMessage pushMessage)
    {
        return pushMessageMapper.selectPushMessageList(pushMessage);
    }

    /**
     * 新增推送消息
     *
     * @param pushMessage 推送消息
     * @return 结果
     */
    @Override
    public int insertPushMessage(PushMessage pushMessage)
    {
        return pushMessageMapper.insertPushMessage(pushMessage);
    }

    /**
     * 修改推送消息
     *
     * @param pushMessage 推送消息
     * @return 结果
     */
    @Override
    public int updatePushMessage(PushMessage pushMessage)
    {
        return pushMessageMapper.updatePushMessage(pushMessage);
    }

    /**
     * 批量删除推送消息
     *
     * @param ids 需要删除的推送消息主键
     * @return 结果
     */
    @Override
    public int deletePushMessageByIds(Long[] ids)
    {
        return pushMessageMapper.deletePushMessageByIds(ids);
    }

    /**
     * 删除推送消息信息
     *
     * @param id 推送消息主键
     * @return 结果
     */
    @Override
    public int deletePushMessageById(Long id)
    {
        return pushMessageMapper.deletePushMessageById(id);
    }
}
