|
@@ -1424,17 +1424,19 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
Integer liveCount = 0;
|
|
|
Integer practiceCount = 0;
|
|
|
List<CountVo> typeCount = baseMapper.selectTypeCount(sysUser.getId(), tomorrow);
|
|
|
- for (CountVo countVo : typeCount) {
|
|
|
- if (countVo.getType().equals(CourseScheduleEnum.LIVE.getCode())) {
|
|
|
- liveCount = countVo.getCount();
|
|
|
- }
|
|
|
- if (countVo.getType().equals(CourseScheduleEnum.PRACTICE.getCode())) {
|
|
|
- practiceCount = countVo.getCount();
|
|
|
+ if (CollectionUtils.isNotEmpty(typeCount)) {
|
|
|
+ for (CountVo countVo : typeCount) {
|
|
|
+ if (countVo.getType().equals(CourseScheduleEnum.LIVE.getCode())) {
|
|
|
+ liveCount = countVo.getCount();
|
|
|
+ }
|
|
|
+ if (countVo.getType().equals(CourseScheduleEnum.PRACTICE.getCode())) {
|
|
|
+ practiceCount = countVo.getCount();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//老师端-明日课程提醒
|
|
|
- if (liveCount != 0 && practiceCount != 0) {
|
|
|
+ if (liveCount != 0 || practiceCount != 0) {
|
|
|
String teacherUrl = sysMessageService.selectConfigUrl(MessageTypeEnum.TOMORROW_COURSE_REMINDER.getCode());
|
|
|
sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.TOMORROW_COURSE_REMINDER,
|
|
|
teacherReceivers, null, 0, teacherUrl, ClientEnum.TEACHER.getCode(),
|