Bläddra i källkod

增加启用课程

宋悦 8 år sedan
förälder
incheckning
ee62bba97a

+ 10 - 1
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/CourseApi.java

@@ -149,10 +149,19 @@ public class CourseApi {
     
     @ApiOperation(value="禁用课程",notes="禁用")
     @PutMapping("/disable/{ids}")
-    public ResponseEntity disableSchool(@PathVariable String ids){
+    public ResponseEntity disableCourse(@PathVariable String ids){
         List<Long> courseIds = Stream.of(ids.split(",")).map(s->Long.parseLong(s.trim()))
                 .collect(Collectors.toList());
         courseService.enableCourse(courseIds,false);
         return new ResponseEntity(HttpStatus.OK);
     }
+
+    @ApiOperation(value="启用课程",notes="启用")
+    @PutMapping("/enable/{ids}")
+    public ResponseEntity enableCourse(@PathVariable String ids){
+        List<Long> courseIds = Stream.of(ids.split(",")).map(s->Long.parseLong(s.trim()))
+                .collect(Collectors.toList());
+        courseService.enableCourse(courseIds,true);
+        return new ResponseEntity(HttpStatus.OK);
+    }
 }