package com.miaxis.examvip.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.miaxis.examvip.domain.VipUserExam;
import com.miaxis.examvip.mapper.VipUserExamMapper;
import com.miaxis.examvip.service.IVipUserExamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 考场会员Service业务层处理
 *
 * @author miaxis
 * @date 2023-03-20
 */
@Service
public class VipUserExamServiceImpl extends ServiceImpl<VipUserExamMapper, VipUserExam> implements IVipUserExamService {
    @Autowired
    private VipUserExamMapper vipUserExamMapper;

    /**
     * 查询考场会员列表
     *
     * @param vipUserExam 考场会员
     * @return 考场会员
     */
    @Override
    public List<VipUserExam> selectVipUserExamList(VipUserExam vipUserExam){
        return vipUserExamMapper.selectVipUserExamList(vipUserExam);
    }

    @Override
    public void deleteVipUserExamByUserIdAndGoodsId(Long userId, Long goodsId) {
        vipUserExamMapper.deleteVipUserExamByUserIdAndGoodsId(userId,goodsId);
    }

    @Override
    public int getUserExamByUserIdAndGoodsId(Long userId, Long goodsId) {
        return vipUserExamMapper.getUserExamByUserIdAndGoodsId(userId,goodsId);
    }
}
