瀏覽代碼

乐直播课程状态

liujc 2 年之前
父節點
當前提交
b4ade6f2e2

+ 56 - 36
.idea/httpRequests/http-requests-log.http

@@ -1,3 +1,59 @@
+POST http://127.0.0.1:8005/vipGroupManage/liveStudentList
+Authorization: bearer b2d082f2-2e51-4880-8119-5471c5287bf9
+Content-Type: application/json
+Content-Length: 78
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "page": 1,
+  "rows": 10,
+  "liveGroupId": 102,
+  "search": "测试59611"
+}
+
+<> 2023-06-14T105403.200.json
+
+###
+
+POST http://127.0.0.1:8005/vipGroupManage/liveStudentList
+Authorization: bearer b2d082f2-2e51-4880-8119-5471c5287bf9
+Content-Type: application/json
+Content-Length: 77
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "page": 1,
+  "rows": 10,
+  "liveGroupId": 102,
+  "search": "测试5961"
+}
+
+<> 2023-06-14T105355.200.json
+
+###
+
+POST http://127.0.0.1:8005/vipGroupManage/liveStudentList
+Authorization: bearer b2d082f2-2e51-4880-8119-5471c5287bf9
+Content-Type: application/json
+Content-Length: 51
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "page": 1,
+  "rows": 10,
+  "liveGroupId": 102
+}
+
+<> 2023-06-14T105332.200.json
+
+###
+
 GET http://127.0.0.1:8005/task/liveCourseRemind
 Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
@@ -693,39 +749,3 @@ Accept-Encoding: br,deflate,gzip,x-gzip
 
 ###
 
-POST http://127.0.0.1:9002/teacherCourseSchedule/liveCoursePage
-Authorization: bearer 6dbea593-df93-4bf4-9f75-538c1bcc231e
-Content-Length: 29
-Content-Type: */*; charset=UTF-8
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "page": 1,
-  "rows": 10
-}
-
-<> 2023-06-08T100117.200.json
-
-###
-
-GET http://127.0.0.1:8005/task/liveCourseRemind
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-06-07T141437.200.json
-
-###
-
-GET http://127.0.0.1:9002/teacherCourseSchedule/liveCourseScheduleTime?courseScheduleId=2030
-Authorization: bearer 2cd308e9-0b8b-4b08-b3cd-f34dc50a8dfd
-Proxy-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-<> 2023-06-07T155507.200.json
-
-###
-

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -6046,6 +6046,17 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         List<CourseScheduleDto> teacherCourseFormat = getTeacherCourseFormat(queryInfo.getTeacherId(), new Date(),
                 queryInfo.getTenantId(), courseScheduleDtos, courseIds, courseIds);
 
+
+        // 直播课判断时间,提前30分钟将课程改为进行中
+        Integer studentRemindTime = Integer.parseInt(sysConfigService.findByParamName(SysConfigService.LIVE_CLASS_START_REMIND_TIME).getParanValue());
+        for (CourseScheduleDto record : teacherCourseFormat) {
+            if (CourseScheduleType.LIVE.equals(record.getType()) && CourseStatusEnum.NOT_START.equals(record.getStatus())) {
+                Date date = DateUtil.addMinutes(new Date(), studentRemindTime);
+                if (date.after(record.getStartClassTime())) {
+                    record.setStatus(CourseStatusEnum.UNDERWAY);
+                }
+            }
+        }
         return page.setRecords(teacherCourseFormat);
     }