package com.gkhy.exam.admin.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; /** *
* 学员与考试题目关系表 前端控制器 *
* * @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)); } }