package com.bonus.material.basic.service.impl;

import java.util.List;
import com.bonus.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.material.basic.mapper.BmNoticeInfoMapper;
import com.bonus.material.basic.domain.BmNoticeInfo;
import com.bonus.material.basic.service.IBmNoticeInfoService;

/**
 * 短信通知Service业务层处理
 * 
 * @author xsheng
 * @date 2024-09-26
 */
@Service
public class BmNoticeInfoServiceImpl implements IBmNoticeInfoService 
{
    @Autowired
    private BmNoticeInfoMapper bmNoticeInfoMapper;

    /**
     * 查询短信通知
     * 
     * @param id 短信通知主键
     * @return 短信通知
     */
    @Override
    public BmNoticeInfo selectBmNoticeInfoById(Long id)
    {
        return bmNoticeInfoMapper.selectBmNoticeInfoById(id);
    }

    /**
     * 查询短信通知列表
     * 
     * @param bmNoticeInfo 短信通知
     * @return 短信通知
     */
    @Override
    public List<BmNoticeInfo> selectBmNoticeInfoList(BmNoticeInfo bmNoticeInfo)
    {
        return bmNoticeInfoMapper.selectBmNoticeInfoList(bmNoticeInfo);
    }

    /**
     * 新增短信通知
     * 
     * @param bmNoticeInfo 短信通知
     * @return 结果
     */
    @Override
    public int insertBmNoticeInfo(BmNoticeInfo bmNoticeInfo)
    {
        bmNoticeInfo.setCreateTime(DateUtils.getNowDate());
        return bmNoticeInfoMapper.insertBmNoticeInfo(bmNoticeInfo);
    }

    /**
     * 修改短信通知
     * 
     * @param bmNoticeInfo 短信通知
     * @return 结果
     */
    @Override
    public int updateBmNoticeInfo(BmNoticeInfo bmNoticeInfo)
    {
        bmNoticeInfo.setUpdateTime(DateUtils.getNowDate());
        return bmNoticeInfoMapper.updateBmNoticeInfo(bmNoticeInfo);
    }

    /**
     * 批量删除短信通知
     * 
     * @param ids 需要删除的短信通知主键
     * @return 结果
     */
    @Override
    public int deleteBmNoticeInfoByIds(Long[] ids)
    {
        return bmNoticeInfoMapper.deleteBmNoticeInfoByIds(ids);
    }

    /**
     * 删除短信通知信息
     * 
     * @param id 短信通知主键
     * @return 结果
     */
    @Override
    public int deleteBmNoticeInfoById(Long id)
    {
        return bmNoticeInfoMapper.deleteBmNoticeInfoById(id);
    }
}
