package com.tzy.service.impl;

import com.tzy.mapper.QuizAnswerMapper;
import com.tzy.pojo.quiz.QuizAnswer;
import com.tzy.service.QuizAnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class QuizAnswerServiceImpl implements QuizAnswerService {

    @Autowired
    QuizAnswerMapper quizAnswerMapper;
    @Override
    public boolean batchSaveAnswer(List<QuizAnswer> quizAnswer) {
        return quizAnswerMapper.batchSaveQuizAnswer(quizAnswer);
    }

    @Override
    public int countRoundByUser(Integer userId, Long round,Long activityId) {
        return quizAnswerMapper.countRoundByUserId(userId, round,activityId);
    }
}
