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/web/ExResourceController.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/exam-admin/src/main/java/com/gkhy/exam/admin/web/ExResourceController.java b/exam-admin/src/main/java/com/gkhy/exam/admin/web/ExResourceController.java
index f123f36..67334d2 100644
--- a/exam-admin/src/main/java/com/gkhy/exam/admin/web/ExResourceController.java
+++ b/exam-admin/src/main/java/com/gkhy/exam/admin/web/ExResourceController.java
@@ -2,6 +2,7 @@
 
 
 import com.gkhy.exam.common.annotation.Log;
+import com.gkhy.exam.common.annotation.RepeatSubmit;
 import com.gkhy.exam.common.api.CommonResult;
 import com.gkhy.exam.common.enums.BusinessType;
 import com.gkhy.exam.system.domain.ExResource;
@@ -46,20 +47,23 @@
         return CommonResult.success(resourceService.selectResourceById(resourceId));
     }
 
+    @RepeatSubmit
     @Log(title = "资源管理", businessType = BusinessType.INSERT)
     @ApiOperation(value = "新增资源")
     @PostMapping
-    public CommonResult add(@Validated @RequestBody ExResource resource){
+    public CommonResult add(@Validated @ModelAttribute  ExResource resource){
         return CommonResult.success(resourceService.insertResource(resource));
     }
 
+    @RepeatSubmit
     @Log(title = "资源管理", businessType = BusinessType.UPDATE)
     @ApiOperation(value = "编辑资源")
     @PutMapping
-    public CommonResult edit(@Validated @RequestBody ExResource resource){
+    public CommonResult edit(@Validated  @ModelAttribute ExResource resource){
         return CommonResult.success(resourceService.updateResource(resource));
     }
 
+    @RepeatSubmit
     @Log(title = "资源管理", businessType = BusinessType.UPDATE)
     @ApiOperation(value = "删除资源")
     @DeleteMapping(value = { "/{resourceId}" })

--
Gitblit v1.9.2