package com.huijy.management.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.huijy.management.mapper.EarlyWarningSendLogMapper;
import com.huijy.management.domain.EarlyWarningSendLog;
import com.huijy.management.service.IEarlyWarningSendLogService;

/**
 * 预警信息发送日志Service业务层处理
 *
 * @author luobo
 * @date 2021-10-04
 */
@Service
public class EarlyWarningSendLogServiceImpl implements IEarlyWarningSendLogService
{
    @Autowired
    private EarlyWarningSendLogMapper earlyWarningSendLogMapper;

    /**
     * 查询预警信息发送日志
     *
     * @param sendLogId 预警信息发送日志主键
     * @return 预警信息发送日志
     */
    @Override
    public EarlyWarningSendLog selectEarlyWarningSendLogBySendLogId(Long sendLogId)
    {
        return earlyWarningSendLogMapper.selectEarlyWarningSendLogBySendLogId(sendLogId);
    }

    /**
     * 查询预警信息发送日志列表
     *
     * @param earlyWarningSendLog 预警信息发送日志
     * @return 预警信息发送日志
     */
    @Override
    public List<EarlyWarningSendLog> selectEarlyWarningSendLogList(EarlyWarningSendLog earlyWarningSendLog)
    {
        return earlyWarningSendLogMapper.selectEarlyWarningSendLogList(earlyWarningSendLog);
    }

    /**
     * 新增预警信息发送日志
     *
     * @param earlyWarningSendLog 预警信息发送日志
     * @return 结果
     */
    @Override
    public int insertEarlyWarningSendLog(EarlyWarningSendLog earlyWarningSendLog)
    {
        return earlyWarningSendLogMapper.insertEarlyWarningSendLog(earlyWarningSendLog);
    }

    /**
     * 修改预警信息发送日志
     *
     * @param earlyWarningSendLog 预警信息发送日志
     * @return 结果
     */
    @Override
    public int updateEarlyWarningSendLog(EarlyWarningSendLog earlyWarningSendLog)
    {
        return earlyWarningSendLogMapper.updateEarlyWarningSendLog(earlyWarningSendLog);
    }

    /**
     * 批量删除预警信息发送日志
     *
     * @param sendLogIds 需要删除的预警信息发送日志主键
     * @return 结果
     */
    @Override
    public int deleteEarlyWarningSendLogBySendLogIds(Long[] sendLogIds)
    {
        return earlyWarningSendLogMapper.deleteEarlyWarningSendLogBySendLogIds(sendLogIds);
    }

    /**
     * 删除预警信息发送日志信息
     *
     * @param sendLogId 预警信息发送日志主键
     * @return 结果
     */
    @Override
    public int deleteEarlyWarningSendLogBySendLogId(Long sendLogId)
    {
        return earlyWarningSendLogMapper.deleteEarlyWarningSendLogBySendLogId(sendLogId);
    }

    public Integer updateLogByMsgId(String msgId,String sendCode){
       return earlyWarningSendLogMapper.updateLogByMsgId(msgId,sendCode);
    }
}
