package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CouponUserMapper;
import com.ruoyi.system.domain.CouponUser;
import com.ruoyi.system.service.ICouponUserService;

/**
 * 优惠券领取记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class CouponUserServiceImpl implements ICouponUserService 
{
    @Autowired
    private CouponUserMapper couponUserMapper;

    /**
     * 查询优惠券领取记录
     * 
     * @param id 优惠券领取记录主键
     * @return 优惠券领取记录
     */
    @Override
    public CouponUser selectCouponUserById(Long id)
    {
        return couponUserMapper.selectCouponUserById(id);
    }



    public int selectCountCouponUserbycouponId(Long couponId)
    {
        return couponUserMapper.selectCountCouponUserbycouponId(couponId);
    }
    /**
     * 查询优惠券领取记录列表
     * 
     * @param couponUser 优惠券领取记录
     * @return 优惠券领取记录
     */
    @Override
    public List<CouponUser> selectCouponUserList(CouponUser couponUser)
    {
        return couponUserMapper.selectCouponUserList(couponUser);
    }

    /**
     * 新增优惠券领取记录
     * 
     * @param couponUser 优惠券领取记录
     * @return 结果
     */
    @Override
    public int insertCouponUser(CouponUser couponUser)
    {
        return couponUserMapper.insertCouponUser(couponUser);
    }

    /**
     * 修改优惠券领取记录
     * 
     * @param couponUser 优惠券领取记录
     * @return 结果
     */
    @Override
    public int updateCouponUser(CouponUser couponUser)
    {
        return couponUserMapper.updateCouponUser(couponUser);
    }

    /**
     * 批量删除优惠券领取记录
     * 
     * @param ids 需要删除的优惠券领取记录主键
     * @return 结果
     */
    @Override
    public int deleteCouponUserByIds(Long[] ids)
    {
        return couponUserMapper.deleteCouponUserByIds(ids);
    }

    /**
     * 删除优惠券领取记录信息
     * 
     * @param id 优惠券领取记录主键
     * @return 结果
     */
    @Override
    public int deleteCouponUserById(Long id)
    {
        return couponUserMapper.deleteCouponUserById(id);
    }
}
