package cn.com.qmth.stmms.biz.distributpaper.service.impl;

import java.util.List;

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

import cn.com.qmth.stmms.biz.distributpaper.dao.ProblemHistoryDao;
import cn.com.qmth.stmms.biz.distributpaper.model.ProblemHistory;
import cn.com.qmth.stmms.biz.distributpaper.service.ProblemHistoryService;

@Service
public class ProblemHistoryServiceImpl implements ProblemHistoryService {

    @Autowired
    private ProblemHistoryDao problemHistoryDao;

    @Transactional
    public ProblemHistory save(ProblemHistory problemHistory) {
        return problemHistoryDao.save(problemHistory);
    }

    public ProblemHistory findById(Integer id) {
        return problemHistoryDao.findOne(id);
    }

    @Transactional
    public void deleteById(Integer id) {
        problemHistoryDao.delete(id);
    }

    @Transactional
    public void delete(ProblemHistory ProblemHistory) {
        problemHistoryDao.delete(ProblemHistory);
    }

    public List<ProblemHistory> findByExamIdAndSubjectIdAndStatusAndIsChecked(Integer examId, Integer subjectId,
            Integer status, boolean isChecked) {
        /*
         * return problemHistoryDao.
         * findByExamIdAndSubjectIdAndStatusAndIsChecked(examId, subjectId,
         * schoolId, status, isChecked);
         */
        return null;
    }

    public List<ProblemHistory> findByExamIdAndSubjectIdAndBlockId(Integer examId, Integer subjectId, Integer blockId) {
        /*
         * return problemHistoryDao.findByExamIdAndSubjectIdAndBlockId (examId,
         * subjectId, schoolId, blockId);
         */
        return null;
    }

}
