“djh”
4 天以前 a0469a082320c33fc19d4e7239b7ddde67945227
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.gkhy.exam.admin.controller.app;
 
 
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.system.domain.ExStudentAnswer;
import com.gkhy.exam.system.service.ExStudentAnswerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
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;
 
/**
 * <p>
 * 学员与考试题目关系表 前端控制器
 * </p>
 *
 * @author kzy
 * @since 2024-06-13 17:47:56
 */
@Api(tags = "APP学员与考试题目关系前端控制器")
@RestController
@RequestMapping("/app/student-answer")
public class AppStudentAnswerController {
    @Autowired
    private ExStudentAnswerService studentAnswerService;
 
    @PreAuthorize("hasAnyAuthority('train:exam:student')")
    @ApiOperation(value = "新增答题")
    @PostMapping
    public CommonResult add(@Validated @RequestBody ExStudentAnswer studentAnswer){
        return CommonResult.success(studentAnswerService.addStudentAnswer(studentAnswer));
    }
 
}