From daf7acb4f107a427e4a83ba1eb26e5e6012cbdaf Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: 星期三, 26 六月 2024 17:04:52 +0800
Subject: [PATCH] update

---
 exam-admin/src/main/java/com/gkhy/exam/admin/app/AppStudentStudyController.java |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/exam-admin/src/main/java/com/gkhy/exam/admin/app/AppStudentStudyController.java b/exam-admin/src/main/java/com/gkhy/exam/admin/app/AppStudentStudyController.java
index ab6c33b..25ecdc0 100644
--- a/exam-admin/src/main/java/com/gkhy/exam/admin/app/AppStudentStudyController.java
+++ b/exam-admin/src/main/java/com/gkhy/exam/admin/app/AppStudentStudyController.java
@@ -9,6 +9,7 @@
 import io.swagger.annotations.ApiImplicitParams;
 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.*;
 
@@ -27,12 +28,14 @@
     @Autowired
     private ExStudentStudyService studentStudyService;
 
+    @PreAuthorize("hasAnyAuthority('train:exam:student')")
     @ApiOperation(value = "新增学习记录")
     @PostMapping
     public CommonResult add(@Validated @RequestBody ExStudentStudy studentStudy){
         return CommonResult.success(studentStudyService.insertStudentStudy(studentStudy));
     }
 
+    @PreAuthorize("hasAnyAuthority('train:exam:student')")
     @ApiOperation(value = "上报学习进度")
     @ApiImplicitParams({
             @ApiImplicitParam(paramType = "body", name = "id", dataType = "long", required = true, value = "学习记录id"),

--
Gitblit v1.9.2