Browse Source

增加查询课程的接口

dzx 5 months ago
parent
commit
dfdf9abd45

+ 22 - 0
src/main/java/com/xjrsoft/module/schedule/controller/ScheduleController.java

@@ -224,6 +224,28 @@ public class ScheduleController {
         return RT.ok("ok");
     }
 
+
+    @GetMapping(value = "/getCourseNames")
+    @ApiOperation(value = "查询课程接口")
+    @SaCheckPermission("evaluateobject:detail")
+    public RT<String> getCourseNames(List<Long> ids) throws Exception {
+        List<CourseTable> list = courseTableService.list(
+                new QueryWrapper<CourseTable>().lambda()
+                        .in(CourseTable::getId, ids)
+        );
+        String result = "";
+        for (int i = 0; i< list.size(); i ++){
+            if(i > 0){
+                result += ",";
+            }
+            CourseTable courseTable = list.get(i);
+            result += courseTable.getCourseName();
+        }
+
+        return RT.ok(result);
+    }
+
+
     /**
      *  顶课预检查
      * @param dto