Selaa lähdekoodia

[教师][正式使用]关闭全部(考试+练习+自主练习)集合。

tom 8 kuukautta sitten
vanhempi
commit
0554d31133

+ 10 - 4
ruoyi-sim/src/main/java/com/ruoyi/sim/controller/RealExamCollectionController.java

@@ -98,28 +98,34 @@ public class RealExamCollectionController extends BaseController {
     }
 
     @PutMapping(value = "/teacher/exam/open/{examCollectionId}")
-    @ApiOperation("[教师][演示使用]打开考试集合")
+    @ApiOperation("[教师][正式使用]打开考试集合")
     public AjaxResult openExam(@PathVariable("examCollectionId") Long examCollectionId) {
         l.info("[教师][演示使用]打开考试集合");
         return service.open(examCollectionId);
     }
 
     @PutMapping(value = "/teacher/exercise/open/{examCollectionId}")
-    @ApiOperation("[教师]打开练习集合")
+    @ApiOperation("[教师][正式使用]打开练习集合")
     public AjaxResult openExercise(@PathVariable("examCollectionId") Long examCollectionId) {
         return service.open(examCollectionId);
     }
 
     @PutMapping(value = "/teacher/exam/close/{examCollectionId}")
-    @ApiOperation("[教师][演示使用]关闭考试集合")
+    @ApiOperation("[教师][正式使用]关闭考试集合")
     public AjaxResult closeExam(@PathVariable("examCollectionId") Long examCollectionId) {
         l.info("[教师][演示使用]关闭考试集合");
         return service.close(examCollectionId);
     }
 
     @PutMapping(value = "/teacher/exercise/close/{examCollectionId}")
-    @ApiOperation("[教师]关闭练习集合")
+    @ApiOperation("[教师][正式使用]关闭练习集合")
     public AjaxResult closeExercise(@PathVariable("examCollectionId") Long examCollectionId) {
         return service.close(examCollectionId);
     }
+
+    @PutMapping(value = "/teacher/all/close/")
+    @ApiOperation("[教师][正式使用]关闭全部(考试+练习+自主练习)集合")
+    public AjaxResult closeAll() {
+        return service.closeAll();
+    }
 }

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

@@ -347,6 +347,10 @@ public class RealExamCollectionService extends Ele6RYBaseService {
         return commSendService.closeSocket();
     }
 
+    public AjaxResult closeAll() {
+        return commSendService.closeSocket();
+    }
+
     public void closeAllType(String type) {
         RealExamCollection q = new RealExamCollection();
         q.setExamCollectionType(type);