package com.fs.live.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.live.mapper.LiveLotteryRecordMapper;
import com.fs.live.domain.LiveLotteryRecord;
import com.fs.live.service.ILiveLotteryRecordService;

/**
 * 直播抽奖记录Service业务层处理
 *
 * @author fs
 * @date 2025-07-17
 */
@Service
public class LiveLotteryRecordServiceImpl implements ILiveLotteryRecordService {
    @Autowired
    private LiveLotteryRecordMapper baseMapper;

    /**
     * 查询直播抽奖记录
     *
     * @param lotteryId 直播抽奖记录主键
     * @return 直播抽奖记录
     */
    @Override
    public LiveLotteryRecord selectLiveLotteryRecordByLotteryId(Long lotteryId)
    {
        return baseMapper.selectLiveLotteryRecordByLotteryId(lotteryId);
    }

    /**
     * 查询直播抽奖记录列表
     *
     * @param liveLotteryRecord 直播抽奖记录
     * @return 直播抽奖记录
     */
    @Override
    public List<LiveLotteryRecord> selectLiveLotteryRecordList(LiveLotteryRecord liveLotteryRecord)
    {
        return baseMapper.selectLiveLotteryRecordList(liveLotteryRecord);
    }

    /**
     * 新增直播抽奖记录
     *
     * @param liveLotteryRecord 直播抽奖记录
     * @return 结果
     */
    @Override
    public int insertLiveLotteryRecord(LiveLotteryRecord liveLotteryRecord)
    {
        liveLotteryRecord.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertLiveLotteryRecord(liveLotteryRecord);
    }

    /**
     * 修改直播抽奖记录
     *
     * @param liveLotteryRecord 直播抽奖记录
     * @return 结果
     */
    @Override
    public int updateLiveLotteryRecord(LiveLotteryRecord liveLotteryRecord)
    {
        return baseMapper.updateLiveLotteryRecord(liveLotteryRecord);
    }

    /**
     * 批量删除直播抽奖记录
     *
     * @param lotteryIds 需要删除的直播抽奖记录主键
     * @return 结果
     */
    @Override
    public int deleteLiveLotteryRecordByLotteryIds(Long[] lotteryIds)
    {
        return baseMapper.deleteLiveLotteryRecordByLotteryIds(lotteryIds);
    }

    /**
     * 删除直播抽奖记录信息
     *
     * @param lotteryId 直播抽奖记录主键
     * @return 结果
     */
    @Override
    public int deleteLiveLotteryRecordByLotteryId(Long lotteryId)
    {
        return baseMapper.deleteLiveLotteryRecordByLotteryId(lotteryId);
    }
}
