ソースを参照

支持两种考试集合删除。

tom 2 週間 前
コミット
91e7c630c3

+ 19 - 1
ruoyi-sim/src/main/java/com/ruoyi/sim/controller/RealExamCollectionController.java

@@ -138,9 +138,27 @@ public class RealExamCollectionController extends BaseController {
         return service.deleteRefTypeSelfExercise();
     }
 
+    /**
+     * 考试 考试集合 删除
+     *
+     * @param examCollectionId
+     * @return
+     */
     @PostMapping("/teacher/ref/{examCollectionId}")
     @ApiOperation("[教师]删除一个考试集合包括关联数据")
-    public AjaxResult deleteRef(@PathVariable Long examCollectionId) {
+    public AjaxResult deleteRefHttpPost(@PathVariable Long examCollectionId) {
+        return service.deleteRef(examCollectionId);
+    }
+
+    /**
+     * 训练 考试集合 删除
+     *
+     * @param examCollectionId
+     * @return
+     */
+    @DeleteMapping("/teacher/ref/{examCollectionId}")
+    @ApiOperation("[教师]删除一个考试集合包括关联数据")
+    public AjaxResult deleteRefHttpDelete(@PathVariable Long examCollectionId) {
         return service.deleteRef(examCollectionId);
     }
 }

+ 2 - 2
ruoyi-sim/src/main/java/com/ruoyi/sim/service/impl/RealExamCollectionService.java

@@ -561,9 +561,9 @@ public class RealExamCollectionService extends Ele6RYBaseService {
      * mx_real_exam_score
      *
      * @param id
-     * @return todo:不支持删除考试
+     * @return 支持删除考试、训练
      */
-    public AjaxResult deleteRef(Long id) {
+    public AjaxResult deleteRef(final Long id) {
         // 删除mx_real_exam_collection表数据
         int count = deleteRealExamCollectionByExamCollectionId(id);
         l.info("考试集合删除数量 = {}", count);