package cn.com.qmth.stmms.biz.mark.service.Impl;

import java.util.List;

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

import cn.com.qmth.stmms.biz.common.BaseQueryService;
import cn.com.qmth.stmms.biz.mark.dao.MarkTrackDao;
import cn.com.qmth.stmms.biz.mark.model.MarkTrack;
import cn.com.qmth.stmms.biz.mark.service.MarkTrackService;

@Service("markTrackService")
public class MarkTrackServiceImpl extends BaseQueryService<MarkTrack> implements MarkTrackService {

    @Autowired
    private MarkTrackDao markTrackDao;

    // @Override
    // public List<MarkTrack> findByStudentId(Integer studentId) {
    // return markTrackDao.findByStudentId(studentId);
    // }

    @Override
    public List<MarkTrack> findByLibraryId(Integer libraryId) {
        return markTrackDao.findByPkLibraryId(libraryId);
    }

    @Override
    public List<MarkTrack> findByLibraryIdAndQuestionNumber(Integer libraryId, String questionNumber) {
        return markTrackDao.findByPkLibraryIdAndPkQuestionNumberOrderByPkNumberAsc(libraryId, questionNumber);
    }

    // @Transactional
    // @Override
    // public MarkTrack save(MarkTrack track) {
    // return markTrackDao.save(track);
    // }

}
