package com.fs.qw.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.common.utils.DateUtils;
import com.fs.course.domain.LuckyBagCollectRecord;
import com.fs.qw.mapper.LuckyBagCollectRecordMapper;
import com.fs.qw.service.ILuckyBagCollectRecordService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 福袋发放及领取记录Service业务层处理
 *
 * @author fs
 * @date 2025-11-24
 */
@Service
public class LuckyBagCollectRecordServiceImpl extends ServiceImpl<LuckyBagCollectRecordMapper, LuckyBagCollectRecord> implements ILuckyBagCollectRecordService {

    /**
     * 查询福袋发放及领取记录
     *
     * @param id 福袋发放及领取记录主键
     * @return 福袋发放及领取记录
     */
    @Override
    public LuckyBagCollectRecord selectLuckyBagCollectRecordById(Long id)
    {
        return baseMapper.selectLuckyBagCollectRecordById(id);
    }

    /**
     * 查询福袋发放及领取记录列表
     *
     * @param luckyBagCollectRecord 福袋发放及领取记录
     * @return 福袋发放及领取记录
     */
    @Override
    public List<LuckyBagCollectRecord> selectLuckyBagCollectRecordList(LuckyBagCollectRecord luckyBagCollectRecord)
    {
        return baseMapper.selectLuckyBagCollectRecordList(luckyBagCollectRecord);
    }

    /**
     * 新增福袋发放及领取记录
     *
     * @param luckyBagCollectRecord 福袋发放及领取记录
     * @return 结果
     */
    @Override
    public int insertLuckyBagCollectRecord(LuckyBagCollectRecord luckyBagCollectRecord)
    {
        luckyBagCollectRecord.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertLuckyBagCollectRecord(luckyBagCollectRecord);
    }

    /**
     * 修改福袋发放及领取记录
     *
     * @param luckyBagCollectRecord 福袋发放及领取记录
     * @return 结果
     */
    @Override
    public int updateLuckyBagCollectRecord(LuckyBagCollectRecord luckyBagCollectRecord)
    {
        luckyBagCollectRecord.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateLuckyBagCollectRecord(luckyBagCollectRecord);
    }

    /**
     * 批量删除福袋发放及领取记录
     *
     * @param ids 需要删除的福袋发放及领取记录主键
     * @return 结果
     */
    @Override
    public int deleteLuckyBagCollectRecordByIds(Long[] ids)
    {
        return baseMapper.deleteLuckyBagCollectRecordByIds(ids);
    }

    /**
     * 删除福袋发放及领取记录信息
     *
     * @param id 福袋发放及领取记录主键
     * @return 结果
     */
    @Override
    public int deleteLuckyBagCollectRecordById(Long id)
    {
        return baseMapper.deleteLuckyBagCollectRecordById(id);
    }
}
