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.LiveLotteryRegistrationMapper;
import com.fs.live.domain.LiveLotteryRegistration;
import com.fs.live.service.ILiveLotteryRegistrationService;

/**
 * 直播抽奖登记Service业务层处理
 *
 * @author fs
 * @date 2025-07-17
 */
@Service
public class LiveLotteryRegistrationServiceImpl implements ILiveLotteryRegistrationService {
    @Autowired
    private LiveLotteryRegistrationMapper baseMapper;

    /**
     * 查询直播抽奖登记
     *
     * @param registrationId 直播抽奖登记主键
     * @return 直播抽奖登记
     */
    @Override
    public LiveLotteryRegistration selectLiveLotteryRegistrationByRegistrationId(Long registrationId)
    {
        return baseMapper.selectLiveLotteryRegistrationByRegistrationId(registrationId);
    }

    /**
     * 查询直播抽奖登记列表
     *
     * @param liveLotteryRegistration 直播抽奖登记
     * @return 直播抽奖登记
     */
    @Override
    public List<LiveLotteryRegistration> selectLiveLotteryRegistrationList(LiveLotteryRegistration liveLotteryRegistration)
    {
        return baseMapper.selectLiveLotteryRegistrationList(liveLotteryRegistration);
    }

    /**
     * 新增直播抽奖登记
     *
     * @param liveLotteryRegistration 直播抽奖登记
     * @return 结果
     */
    @Override
    public int insertLiveLotteryRegistration(LiveLotteryRegistration liveLotteryRegistration)
    {
        liveLotteryRegistration.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertLiveLotteryRegistration(liveLotteryRegistration);
    }

    /**
     * 修改直播抽奖登记
     *
     * @param liveLotteryRegistration 直播抽奖登记
     * @return 结果
     */
    @Override
    public int updateLiveLotteryRegistration(LiveLotteryRegistration liveLotteryRegistration)
    {
        return baseMapper.updateLiveLotteryRegistration(liveLotteryRegistration);
    }

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

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