package cn.iocoder.yudao.module.jx.controller.admin;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.course.vo.ProcessVO;
import cn.iocoder.yudao.module.jx.core.controller.BaseController;
import cn.iocoder.yudao.module.jx.domain.StudentScoreInput;
import cn.iocoder.yudao.module.jx.service.StudentScoreInputService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@Tag(name = "管理后台 - 学员考试成绩录入")
@RestController
@RequestMapping("/scoreInput")
@Validated
public class StudentScoreInputController extends BaseController {

    @Autowired
    private StudentScoreInputService studentScoreInputService;

    /**
     * 录入学员成绩
     */
    @PostMapping("/input")
    public CommonResult scoreInput(@RequestBody StudentScoreInput studentScoreInput) {
        studentScoreInputService.scoreInput(studentScoreInput);
        return success();
    }

    @PutMapping("/update")
    public CommonResult scoreEdit(@RequestBody StudentScoreInput studentScoreInput) {
        studentScoreInputService.scoreEdit(studentScoreInput);
        return success();
    }
}
