package com.qmth.qrzk.repository.common.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import com.qmth.qrzk.repository.user.model.Question;

@Component("questionMapper")
public interface QuestionMapper extends CommonMapper {

	public int saveQuestion(Question question);
	
	public List<Question> searchByCondition(@Param("question")Question question,@Param("showCount")int showCount,@Param("currentPage")int currentPage);
	
	public int searchByConditionCount(Question question);
	
	public int importQuestion(Question question);
	
	public Question searchById(int id);
	
	public void updateQuestion(Question question);
	
	public List<Question> generatePaperQuestion(Question question);
	
	public int updateAudit(Question question);
	
	public int searchAuditCount(@Param("question")Question question,@Param("condition1")String condition1,@Param("condition2")String condition2);
	
	public List<Question> searchAudit(@Param("question")Question question,@Param("showCount")int showCount,@Param("currentPage")int currentPage,@Param("condition1")String condition1,@Param("condition2")String condition2);
	
	public List<Question> findAll();
	
	public List<Question> getStatusCount();
	
	public int getMaxChapterByCourseId(int courseId);
	
	public int getCountByCondition(Question question);
	
	public int getCountByChapter(Question question);
	
	public List<Question> searchPaperQuestionForSimilar(@Param("similarPaperNo")String similarPaperNo,@Param("whichQuestion")String whichQuestion);
	
	public List<Question> findRecent3YearQues(Question question);
	
	public List<Question> queryQuestionKeyTJ(Question question);
}
