package com.rongwei.training.controller;

import com.rongwei.rwcommon.base.R;
import com.rongwei.trainingcommon.sys.service.CourseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 课程表 class
 *
 * @author XH
 * @date 2020/11/23
 */
@RestController
@RequestMapping("train/course")
@Slf4j
public class TrainingCourseController {
    @Autowired
    private CourseService courseService;

    @PostMapping("/check")
    public R saveEmpExam(@RequestBody List<String> courseIds) {
        log.info("开始校验课程是否被课程计划所引用");
        return courseService.checkCourse(courseIds);
    }
}
