package cn.com.qmth.stmms.biz.exam.service;

import cn.com.qmth.stmms.biz.exam.model.MarkGroup;
import cn.com.qmth.stmms.biz.exam.model.Marker;
import cn.com.qmth.stmms.biz.exam.query.MarkerSearchQuery;

import java.util.List;
import java.util.Set;

public interface MarkerService {

    Marker save(Marker marker);

    Marker findById(Integer id);

    List<Marker> findByExamAndSubjectAndGroup(int examId, String subjectCode, int groupNumber);

    long countByExam(int examId);

    MarkerSearchQuery findByQuery(MarkerSearchQuery query);

    List<Marker> getMarkCount(int examId);

    long countByExamAndSubjectAndGroup(int examId, String subjectCode, int number);

    List<Marker> getMarkCount(int examId, Set<String> subjectCodes);

    public int batchSave(List<Marker> list);

    List<Marker> findByExamAndUserId(Integer examId, Integer userId);

    Marker findByExamAndSubjectAndNumberAndUserId(int examId, String subjectCode, Integer number, Integer userId);

    long countByUserId(Integer userId);

    void deleteById(Integer markerId);

    void save(MarkGroup group, Integer[] userIds);

    List<Marker> findByExamAndSubjectAndUserIdAndEnable(Integer examId, String subjectCode, Integer userId,
            boolean enable);

    void logoutByExamIdAndSubjectCodeAndGroupNumber(Integer examId, String subjectCode, Integer number);

    void updateRejectCountById(Integer markerId);

    void updateEnableByUserId(Integer userId, boolean enable);

}
