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.SysSmsBlacklistMapper;
import com.ruoyi.system.domain.SysSmsBlacklist;
import com.ruoyi.system.service.ISysSmsBlacklistService;

/**
 * 短信手机黑名单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-12
 */
@Service
public class SysSmsBlacklistServiceImpl implements ISysSmsBlacklistService 
{
    @Autowired
    private SysSmsBlacklistMapper sysSmsBlacklistMapper;

    /**
     * 查询短信手机黑名单
     * 
     * @param id 短信手机黑名单主键
     * @return 短信手机黑名单
     */
    @Override
    public SysSmsBlacklist selectSysSmsBlacklistById(Long id)
    {
        return sysSmsBlacklistMapper.selectSysSmsBlacklistById(id);
    }

    /**
     * 查询短信手机黑名单列表
     * 
     * @param sysSmsBlacklist 短信手机黑名单
     * @return 短信手机黑名单
     */
    @Override
    public List<SysSmsBlacklist> selectSysSmsBlacklistList(SysSmsBlacklist sysSmsBlacklist)
    {
        return sysSmsBlacklistMapper.selectSysSmsBlacklistList(sysSmsBlacklist);
    }

    /**
     * 新增短信手机黑名单
     * 
     * @param sysSmsBlacklist 短信手机黑名单
     * @return 结果
     */
    @Override
    public int insertSysSmsBlacklist(SysSmsBlacklist sysSmsBlacklist)
    {
        sysSmsBlacklist.setCreateTime(DateUtils.getNowDate());
        return sysSmsBlacklistMapper.insertSysSmsBlacklist(sysSmsBlacklist);
    }

    /**
     * 修改短信手机黑名单
     * 
     * @param sysSmsBlacklist 短信手机黑名单
     * @return 结果
     */
    @Override
    public int updateSysSmsBlacklist(SysSmsBlacklist sysSmsBlacklist)
    {
        return sysSmsBlacklistMapper.updateSysSmsBlacklist(sysSmsBlacklist);
    }

    /**
     * 批量删除短信手机黑名单
     * 
     * @param ids 需要删除的短信手机黑名单主键
     * @return 结果
     */
    @Override
    public int deleteSysSmsBlacklistByIds(Long[] ids)
    {
        return sysSmsBlacklistMapper.deleteSysSmsBlacklistByIds(ids);
    }

    /**
     * 删除短信手机黑名单信息
     * 
     * @param id 短信手机黑名单主键
     * @return 结果
     */
    @Override
    public int deleteSysSmsBlacklistById(Long id)
    {
        return sysSmsBlacklistMapper.deleteSysSmsBlacklistById(id);
    }
}
