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.SmsBlacklistMapper;
import com.ruoyi.system.domain.SmsBlacklist;
import com.ruoyi.system.service.ISmsBlacklistService;

/**
 * 手机黑名单Service业务层处理
 * 
 * @author ie
 * @date 2025-01-25
 */
@Service
public class SmsBlacklistServiceImpl implements ISmsBlacklistService 
{
    @Autowired
    private SmsBlacklistMapper smsBlacklistMapper;

    /**
     * 查询手机黑名单
     * 
     * @param id 手机黑名单主键
     * @return 手机黑名单
     */
    @Override
    public SmsBlacklist selectSmsBlacklistById(Long id)
    {
        return smsBlacklistMapper.selectSmsBlacklistById(id);
    }

    /**
     * 查询手机黑名单列表
     * 
     * @param smsBlacklist 手机黑名单
     * @return 手机黑名单
     */
    @Override
    public List<SmsBlacklist> selectSmsBlacklistList(SmsBlacklist smsBlacklist)
    {
        return smsBlacklistMapper.selectSmsBlacklistList(smsBlacklist);
    }

    /**
     * 新增手机黑名单
     * 
     * @param smsBlacklist 手机黑名单
     * @return 结果
     */
    @Override
    public int insertSmsBlacklist(SmsBlacklist smsBlacklist)
    {
        smsBlacklist.setCreateTime(DateUtils.getNowDate());
        return smsBlacklistMapper.insertSmsBlacklist(smsBlacklist);
    }

    /**
     * 修改手机黑名单
     * 
     * @param smsBlacklist 手机黑名单
     * @return 结果
     */
    @Override
    public int updateSmsBlacklist(SmsBlacklist smsBlacklist)
    {
        return smsBlacklistMapper.updateSmsBlacklist(smsBlacklist);
    }

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

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