package com.qxueyou.scc.school.action;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import com.qxueyou.scc.base.model.Result;
|
import com.qxueyou.scc.school.service.IStudentScoreService;
|
|
/**
|
* 用户学分控制层;
|
*
|
* @author junliang
|
* @createTime 2017-12-10
|
*/
|
@Controller
|
@RequestMapping(value = "/studentScore")
|
public class StudentScoreController {
|
@Autowired
|
private IStudentScoreService studentScoreService;
|
|
/**
|
*
|
* @param classId
|
* 班级id
|
* @param videoId
|
* 视频id
|
* @param score
|
* 学分
|
* @return
|
*/
|
@RequestMapping(value = "/addStudentScore", method = RequestMethod.GET)
|
@ResponseBody
|
public Result addStudentScore(String classId, String videoId, Integer score) {
|
|
return studentScoreService.addStudentScore(classId, videoId, score);
|
}
|
|
/**
|
* 获取学分
|
*
|
* @return
|
*/
|
@RequestMapping(value = "/getStudentScore", method = RequestMethod.GET)
|
@ResponseBody
|
public Result getStudentScore() {
|
|
return studentScoreService.getStudentScore();
|
|
}
|
|
/**
|
* 是否学完
|
*
|
* @return
|
*/
|
@RequestMapping(value = "/isLearn", method = RequestMethod.GET)
|
@ResponseBody
|
public Result isLearn(String classId) {
|
return studentScoreService.checkStudyStatus(classId);
|
|
}
|
|
}
|