Browse Source

1、教务端

Joburgess 5 years ago
parent
commit
1e98edc59b

+ 42 - 0
mec-web/src/main/java/com/ym/mec/web/controller/EducationCourseScheduleController.java

@@ -0,0 +1,42 @@
+package com.ym.mec.web.controller;
+
+import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
+import com.ym.mec.biz.service.CourseScheduleService;
+import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @Author Joburgess
+ * @Date 2020/1/8
+ */
+
+@RestController
+@RequestMapping("educationCourseSchedule")
+@Api(tags = "教务端课程计划服务")
+public class EducationCourseScheduleController extends BaseController {
+
+    @Autowired
+    private CourseScheduleService scheduleService;
+
+    @ApiOperation(value = "根据月份获取乐团在该月有课的日期")
+    @GetMapping("/getCourseScheduleDateByMonth")
+    public Object getCourseScheduleDateByMonth(@ApiParam(value = "月份", required = true) @RequestParam Date month) {
+        return succeed(scheduleService.getCourseScheduleDates(month));
+    }
+
+    @ApiOperation(value = "根据日期获取当日排课")
+    @GetMapping("/getCourseSchedulesWithDate")
+    public Object getCourseSchedulesWithDate(CourseScheduleQueryInfo queryInfo) {
+        return succeed(scheduleService.getCourseSchedulesWithDateByEdu(queryInfo));
+    }
+
+}