瀏覽代碼

增加查询课程的接口

dzx 5 月之前
父節點
當前提交
dfdf9abd45
共有 1 個文件被更改,包括 22 次插入0 次删除
  1. 22 0
      src/main/java/com/xjrsoft/module/schedule/controller/ScheduleController.java

+ 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