package com.qmth.qrzk.repository.user.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.qmth.qrzk.dao.IQuestionAttachmentDao;
import com.qmth.qrzk.repository.user.model.QuestionAttachment;
import com.qmth.qrzk.repository.user.service.IQuestionAttachmentService;

@Service("questionAttachmentServiceImpl")
public class QuestionAttachmentServiceImpl implements
		IQuestionAttachmentService {

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

}
