package com.qmth.file.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.file.dao.ExamPlanDao;
import com.qmth.file.model.ExamPlan;
import com.qmth.file.service.ExamPlanService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
 * 考试计划
 *
 * @author tianjun
 */
@Service
public class ExamPlanServiceImpl extends ServiceImpl<ExamPlanDao, ExamPlan> implements ExamPlanService {

//    @Autowired
//    private MongoOperations mongoTemplate;

    @Resource
    private ExamPlanDao examPlanDao;

    @Override
    public ExamPlan findByExamCode(String examCode) {
        List<ExamPlan> examPlans = examPlanDao.findByExamCode(examCode);
        return examPlans.size() > 0 ? examPlans.get(0) : null;
    }

}
