package com.qmth.themis.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.themis.business.dao.TSyncExamStudentScoreMapper;
import com.qmth.themis.business.entity.TSyncExamStudentScore;
import com.qmth.themis.business.service.TSyncExamStudentScoreService;
import org.springframework.stereotype.Service;

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

/**
 * <p>
 * 同步云阅卷考生成绩表 服务实现类
 * </p>
 *
 * @author wangliang
 * @since 2022-07-14
 */
@Service
public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStudentScoreMapper, TSyncExamStudentScore> implements TSyncExamStudentScoreService {

    /**
     * 根据考试ids查找
     *
     * @param examRecordIds
     * @return
     */
    @Override
    public List<TSyncExamStudentScore> findByExamRecordIds(Set<String> examRecordIds) {
        QueryWrapper<TSyncExamStudentScore> tSyncExamStudentScoreQueryWrapper = new QueryWrapper<>();
        tSyncExamStudentScoreQueryWrapper.lambda().in(TSyncExamStudentScore::getExamNumber, examRecordIds);
        return this.list(tSyncExamStudentScoreQueryWrapper);
    }
}
