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

import cn.com.qmth.stmms.biz.common.BaseQueryService;
import cn.com.qmth.stmms.biz.mark.dao.MarkSpecialTagDao;
import cn.com.qmth.stmms.biz.mark.model.MarkSpecialTag;
import cn.com.qmth.stmms.biz.mark.service.MarkSpecialTagService;

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

import java.util.List;

@Service
public class MarkSpecialTagServiceImpl extends BaseQueryService<MarkSpecialTag> implements MarkSpecialTagService {

    @Autowired
    MarkSpecialTagDao markSpecialTagDao;

    // @Transactional
    // @Override
    // public MarkSpecialTag save(MarkSpecialTag tag) {
    // return markSpecialTagDao.save(tag);
    // }

    @Transactional
    @Override
    public void deleteByLibraryId(Integer libraryId) {
        markSpecialTagDao.deleteByLibraryId(libraryId);
    }

    @Override
    public List<MarkSpecialTag> findByLibraryId(Integer libraryId) {
        return markSpecialTagDao.findByLibraryIdOrderByIdAsc(libraryId);
    }

    // @Override
    // public void deleteByMarkerId(Integer markerId) {
    // markSpecialTagDao.deleteByMarkerId(markerId,LibraryStatus.ARBITRATED,LibraryStatus.WAIT_ARBITRATE);
    // }
    @Override
    public void deleteByExamAndSubjectAndGroup(Integer examId, String subjectCode, Integer groupNumber) {
        markSpecialTagDao.deleteByExamAndSubjectAndGroup(examId, subjectCode, groupNumber);

    }
}
