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.IQuestionAttachmentDao;
import com.qmth.qrzk.repository.common.mapper.QuestionAttachmentMapper;
import com.qmth.qrzk.repository.user.model.QuestionAttachment;

@Repository("questionAttachmentDaoImpl")
@Transactional
public class QuestionAttachmentDaoImpl implements IQuestionAttachmentDao {

	@Autowired
	@Qualifier("questionAttachmentMapper")
	private QuestionAttachmentMapper questionAttachmentMapper;
	@Override
	public int insertAttachement(QuestionAttachment qa) {
		// TODO Auto-generated method stub
		return questionAttachmentMapper.saveAttachment(qa);
	}
	@Override
	public List<QuestionAttachment> selectByQuestionId(int id) {
		// TODO Auto-generated method stub
		return questionAttachmentMapper.selectByQuestionId(id);
	}
	@Override
	public QuestionAttachment queryById(int id) {
		// TODO Auto-generated method stub
		return questionAttachmentMapper.queryById(id);
	}

}
