package com.qmth.teachcloud.report.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.teachcloud.report.business.bean.result.CourseDimensionResult;
import com.qmth.teachcloud.report.business.entity.TBDimension;
import com.qmth.teachcloud.report.business.mapper.TBDimensionMapper;
import com.qmth.teachcloud.report.business.service.TBDimensionService;
import org.springframework.stereotype.Service;

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

/**
 * <p>
 * 考查点维度基础表 服务实现类
 * </p>
 *
 * @author wangliang
 * @since 2021-06-01
 */
@Service
public class TBDimensionServiceImpl extends ServiceImpl<TBDimensionMapper, TBDimension> implements TBDimensionService {

    @Resource
    TBDimensionMapper tbDimensionMapper;

    /**
     * 查找维度信息
     *
     * @param examId
     * @param courseCode
     * @param collegeId
     * @return
     */
    @Override
    public List<CourseDimensionResult> findDimensionInfo(Long examId, String courseCode, Long collegeId) {
        return tbDimensionMapper.findDimensionInfo(examId, courseCode, collegeId);
    }

    /**
     * 查找教师维度信息
     *
     * @param examId
     * @param courseCode
     * @param teacherId
     * @return
     */
    @Override
    public List<CourseDimensionResult> findDimensionByTeacherInfo(Long examId, String courseCode, Long teacherId) {
        return tbDimensionMapper.findDimensionByTeacherInfo(examId, courseCode, teacherId);
    }

    @Override
    public List<CourseDimensionResult> findDimensionByTeacherCollegeInfo(Long examId, String courseCode, Long teacherId, Long inspectCollegeId) {
        return tbDimensionMapper.findDimensionByTeacherCollegeInfo(examId, courseCode, teacherId, inspectCollegeId);
    }
}
