package com.qmth.qrzk.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.qmth.qrzk.dao.IQuestionOptionDao;
import com.qmth.qrzk.repository.common.mapper.QuestionOptionMapper;
import com.qmth.qrzk.repository.user.model.QuestionOption;

@Repository("questionOptionDaoImpl")
@Transactional
public class QuestionOptionDaoImpl implements IQuestionOptionDao {

	@Autowired
	@Qualifier("questionOptionMapper")
	private QuestionOptionMapper questionOptionMapper;
	
	@Override
	public int insertOption(QuestionOption qo) {
		// TODO Auto-generated method stub
		return questionOptionMapper.saveOption(qo);
	}

	@Override
	public List<QuestionOption> selectByQuestionId(int question_id) {
		// TODO Auto-generated method stub
		return questionOptionMapper.selectByQuestionId(question_id);
	}

	@Override
	public int deleteById(int id) {
		// TODO Auto-generated method stub
		return questionOptionMapper.deleteById(id);
	}

	@Override
	public int updateOption(QuestionOption qo) {
		// TODO Auto-generated method stub
		return questionOptionMapper.updateOption(qo);
	}

}
