package com.ruoyi.system.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.system.mapper.SysMessageRecordMapper;
import com.ruoyi.system.domain.SysMessageRecord;
import com.ruoyi.system.service.ISysMessageRecordService;

/**
 * 消息接收记录Service业务层处理
 * 
 * @author haotian
 * @date 2024-11-04
 */
@Service
public class SysMessageRecordServiceImpl implements ISysMessageRecordService 
{
    @Autowired
    private SysMessageRecordMapper sysMessageRecordMapper;

    /**
     * 查询消息接收记录
     * 
     * @param messageRecordId 消息接收记录主键
     * @return 消息接收记录
     */
    @Override
    public SysMessageRecord selectSysMessageRecordByMessageRecordId(Long messageRecordId)
    {
        return sysMessageRecordMapper.selectSysMessageRecordByMessageRecordId(messageRecordId);
    }

    /**
     * 查询消息接收记录列表
     * 
     * @param sysMessageRecord 消息接收记录
     * @return 消息接收记录
     */
    @Override
    public List<SysMessageRecord> selectSysMessageRecordList(SysMessageRecord sysMessageRecord)
    {
        return sysMessageRecordMapper.selectSysMessageRecordList(sysMessageRecord);
    }

    /**
     * 新增消息接收记录
     * 
     * @param sysMessageRecord 消息接收记录
     * @return 结果
     */
    @Override
    public int insertSysMessageRecord(SysMessageRecord sysMessageRecord)
    {
        sysMessageRecord.setCreateTime(DateUtils.getNowDate());
        return sysMessageRecordMapper.insertSysMessageRecord(sysMessageRecord);
    }

    /**
     * 修改消息接收记录
     * 
     * @param sysMessageRecord 消息接收记录
     * @return 结果
     */
    @Override
    public int updateSysMessageRecord(SysMessageRecord sysMessageRecord)
    {
        sysMessageRecord.setUpdateTime(DateUtils.getNowDate());
        return sysMessageRecordMapper.updateSysMessageRecord(sysMessageRecord);
    }

    /**
     * 批量删除消息接收记录
     * 
     * @param messageRecordIds 需要删除的消息接收记录主键
     * @return 结果
     */
    @Override
    public int deleteSysMessageRecordByMessageRecordIds(Long[] messageRecordIds)
    {
        return sysMessageRecordMapper.deleteSysMessageRecordByMessageRecordIds(messageRecordIds);
    }

    /**
     * 删除消息接收记录信息
     * 
     * @param messageRecordId 消息接收记录主键
     * @return 结果
     */
    @Override
    public int deleteSysMessageRecordByMessageRecordId(Long messageRecordId)
    {
        return sysMessageRecordMapper.deleteSysMessageRecordByMessageRecordId(messageRecordId);
    }
}
