package com.ruoyi.ss.msgLog.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.ss.msgLog.domain.MsgLog;
import com.ruoyi.ss.msgLog.mapper.MsgLogMapper;
import com.ruoyi.ss.msgLog.service.IMsgLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 短信日志Service业务层处理
 *
 * @author qiuzhenzhen
 * @date 2024-07-24
 */
@Service
public class MsgLogServiceImpl implements IMsgLogService
{
    @Autowired
    private MsgLogMapper eMsgLogMapper;

    /**
     * 查询短信日志
     *
     * @param id 短信日志主键
     * @return 短信日志
     */
    @Override
    public MsgLog selectEtMsgLogById(Long id)
    {
        return eMsgLogMapper.selectEtMsgLogById(id);
    }

    /**
     * 查询短信日志列表
     *
     * @param eMsgLog 短信日志
     * @return 短信日志
     */
    @Override
    public List<MsgLog> selectEtMsgLogList(MsgLog eMsgLog)
    {
        return eMsgLogMapper.selectEtMsgLogList(eMsgLog);
    }

    /**
     * 新增短信日志
     *
     * @param eMsgLog 短信日志
     * @return 结果
     */
    @Override
    public int insertEtMsgLog(MsgLog eMsgLog)
    {
        eMsgLog.setCreateTime(DateUtils.getNowDate());
        return eMsgLogMapper.insertEtMsgLog(eMsgLog);
    }

    /**
     * 修改短信日志
     *
     * @param eMsgLog 短信日志
     * @return 结果
     */
    @Override
    public int updateEtMsgLog(MsgLog eMsgLog)
    {
        return eMsgLogMapper.updateEtMsgLog(eMsgLog);
    }

    /**
     * 批量删除短信日志
     *
     * @param ids 需要删除的短信日志主键
     * @return 结果
     */
    @Override
    public int deleteEtMsgLogByIds(Long[] ids)
    {
        return eMsgLogMapper.deleteEtMsgLogByIds(ids);
    }

    /**
     * 删除短信日志信息
     *
     * @param id 短信日志主键
     * @return 结果
     */
    @Override
    public int deleteEtMsgLogById(Long id)
    {
        return eMsgLogMapper.deleteEtMsgLogById(id);
    }
}
