package com.fs.qw.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.qw.mapper.BindPhoneRedPacketRecordMapper;
import com.fs.qw.domain.BindPhoneRedPacketRecord;
import com.fs.qw.service.IBindPhoneRedPacketRecordService;

/**
 * 绑定手机号红包领取记录Service业务层处理
 * 
 * @author fs
 * @date 2026-03-17
 */
@Service
public class BindPhoneRedPacketRecordServiceImpl extends ServiceImpl<BindPhoneRedPacketRecordMapper, BindPhoneRedPacketRecord> implements IBindPhoneRedPacketRecordService {

    /**
     * 查询绑定手机号红包领取记录
     * 
     * @param id 绑定手机号红包领取记录主键
     * @return 绑定手机号红包领取记录
     */
    @Override
    public BindPhoneRedPacketRecord selectBindPhoneRedPacketRecordById(Long id)
    {
        return baseMapper.selectBindPhoneRedPacketRecordById(id);
    }

    /**
     * 查询绑定手机号红包领取记录列表
     * 
     * @param bindPhoneRedPacketRecord 绑定手机号红包领取记录
     * @return 绑定手机号红包领取记录
     */
    @Override
    public List<BindPhoneRedPacketRecord> selectBindPhoneRedPacketRecordList(BindPhoneRedPacketRecord bindPhoneRedPacketRecord)
    {
        return baseMapper.selectBindPhoneRedPacketRecordList(bindPhoneRedPacketRecord);
    }

    /**
     * 新增绑定手机号红包领取记录
     * 
     * @param bindPhoneRedPacketRecord 绑定手机号红包领取记录
     * @return 结果
     */
    @Override
    public int insertBindPhoneRedPacketRecord(BindPhoneRedPacketRecord bindPhoneRedPacketRecord)
    {
        bindPhoneRedPacketRecord.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertBindPhoneRedPacketRecord(bindPhoneRedPacketRecord);
    }

    /**
     * 修改绑定手机号红包领取记录
     * 
     * @param bindPhoneRedPacketRecord 绑定手机号红包领取记录
     * @return 结果
     */
    @Override
    public int updateBindPhoneRedPacketRecord(BindPhoneRedPacketRecord bindPhoneRedPacketRecord)
    {
        bindPhoneRedPacketRecord.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateBindPhoneRedPacketRecord(bindPhoneRedPacketRecord);
    }

    /**
     * 批量删除绑定手机号红包领取记录
     * 
     * @param ids 需要删除的绑定手机号红包领取记录主键
     * @return 结果
     */
    @Override
    public int deleteBindPhoneRedPacketRecordByIds(Long[] ids)
    {
        return baseMapper.deleteBindPhoneRedPacketRecordByIds(ids);
    }

    /**
     * 删除绑定手机号红包领取记录信息
     * 
     * @param id 绑定手机号红包领取记录主键
     * @return 结果
     */
    @Override
    public int deleteBindPhoneRedPacketRecordById(Long id)
    {
        return baseMapper.deleteBindPhoneRedPacketRecordById(id);
    }
}
