package com.ruoyi.framework.recovery.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.framework.recovery.mapper.WxUserLotteryMapper;
import com.ruoyi.framework.recovery.domain.WxUserLottery;
import com.ruoyi.framework.recovery.service.IWxUserLotteryService;

/**
 * 微信中奖记录Service业务层处理
 * 
 * @author jin
 * @date 2024-12-17
 */
@Service
public class WxUserLotteryServiceImpl implements IWxUserLotteryService 
{
    @Autowired
    private WxUserLotteryMapper wxUserLotteryMapper;

    /**
     * 查询微信中奖记录
     * 
     * @param id 微信中奖记录主键
     * @return 微信中奖记录
     */
    @Override
    public WxUserLottery selectWxUserLotteryById(Long id)
    {
        return wxUserLotteryMapper.selectWxUserLotteryById(id);
    }

    /**
     * 查询微信中奖记录列表
     * 
     * @param wxUserLottery 微信中奖记录
     * @return 微信中奖记录
     */
    @Override
    public List<WxUserLottery> selectWxUserLotteryList(WxUserLottery wxUserLottery)
    {
        return wxUserLotteryMapper.selectWxUserLotteryList(wxUserLottery);
    }

    /**
     * 新增微信中奖记录
     * 
     * @param wxUserLottery 微信中奖记录
     * @return 结果
     */
    @Override
    public int insertWxUserLottery(WxUserLottery wxUserLottery)
    {
        wxUserLottery.setCreateDate(new Date());
        return wxUserLotteryMapper.insertWxUserLottery(wxUserLottery);
    }

    /**
     * 修改微信中奖记录
     * 
     * @param wxUserLottery 微信中奖记录
     * @return 结果
     */
    @Override
    public int updateWxUserLottery(WxUserLottery wxUserLottery)
    {
        return wxUserLotteryMapper.updateWxUserLottery(wxUserLottery);
    }

    /**
     * 批量删除微信中奖记录
     * 
     * @param ids 需要删除的微信中奖记录主键
     * @return 结果
     */
    @Override
    public int deleteWxUserLotteryByIds(Long[] ids)
    {
        return wxUserLotteryMapper.deleteWxUserLotteryByIds(ids);
    }

    /**
     * 删除微信中奖记录信息
     * 
     * @param id 微信中奖记录主键
     * @return 结果
     */
    @Override
    public int deleteWxUserLotteryById(Long id)
    {
        return wxUserLotteryMapper.deleteWxUserLotteryById(id);
    }
}
