package com.qmth.distributed.print.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.distributed.print.business.entity.ExamTaskPaperLog;
import com.qmth.distributed.print.business.mapper.ExamTaskPaperLogMapper;
import com.qmth.distributed.print.business.service.ExamTaskPaperLogService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 卷库修改审核临时表 服务实现类
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
@Service
public class ExamTaskPaperLogServiceImpl extends ServiceImpl<ExamTaskPaperLogMapper, ExamTaskPaperLog> implements ExamTaskPaperLogService {

    @Override
    public ExamTaskPaperLog getByExamTaskIdAndReview(Long examTaskId, boolean review) {
        QueryWrapper<ExamTaskPaperLog> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(ExamTaskPaperLog::getExamTaskId, examTaskId).eq(ExamTaskPaperLog::getReview, review);
        return this.getOne(queryWrapper);
    }
}
