|
@@ -37,7 +37,7 @@ import java.util.stream.Stream;
|
|
|
|
|
|
@Service
|
|
|
public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSchedule> implements CourseScheduleService {
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private CourseScheduleDao courseScheduleDao;
|
|
|
@Autowired
|
|
@@ -1090,7 +1090,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if(status == AuditStatusEnum.ING){
|
|
|
throw new BizException("审批状态不正确");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
CourseScheduleComplaints courseScheduleComplaints = courseScheduleComplaintsDao.get(id);
|
|
|
if (Objects.isNull(courseScheduleComplaints)) {
|
|
|
throw new BizException("投诉记录不存在");
|
|
@@ -1118,14 +1118,14 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if (studentAttendanceList != null && studentAttendanceList.size() > 0) {
|
|
|
studentAttendanceDao.addStudentAttendances(studentAttendanceList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//自动更新课程状态至“已结束”
|
|
|
List<CourseSchedule> list = courseScheduleDao.queryFinishedWithNoUpdateStatus();
|
|
|
|
|
|
List<CourseSchedule> updateList = new ArrayList<CourseSchedule>();
|
|
|
List<Integer> classGroupIds = new ArrayList<Integer>();
|
|
|
List<Long> courseScheduleIdList = new ArrayList<Long>();
|
|
|
-
|
|
|
+
|
|
|
for (CourseSchedule courseSchedule : list) {
|
|
|
courseSchedule.setStatus(CourseStatusEnum.OVER);
|
|
|
courseSchedule.setUpdateTime(date);
|
|
@@ -1134,7 +1134,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if (!classGroupIds.contains(courseSchedule.getClassGroupId())) {
|
|
|
classGroupIds.add(courseSchedule.getClassGroupId());
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(courseSchedule.getGroupType() == GroupType.VIP){
|
|
|
courseScheduleIdList.add(courseSchedule.getId());
|
|
|
}
|
|
@@ -1147,10 +1147,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
// 更新班级已上课次
|
|
|
if (classGroupIds.size() > 0) {
|
|
|
classGroupService.batchIncreaseClassTimes(classGroupIds);
|
|
|
-
|
|
|
+
|
|
|
//查询班级信息
|
|
|
List<ClassGroup> classGroupList = classGroupService.findClassGroupByIds(classGroupIds.stream().map(e->e.toString()).collect(Collectors.joining(",")));
|
|
|
-
|
|
|
+
|
|
|
List<String> vipGroupIdList = new ArrayList<String>();
|
|
|
for(ClassGroup classGroup : classGroupList){
|
|
|
if(classGroup.getGroupType() == GroupType.VIP && classGroup.getCurrentClassTimes() == classGroup.getTotalClassTimes().intValue()){
|
|
@@ -1168,12 +1168,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
vipGroupDao.batchUpdate(vipGroupList);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (courseScheduleIdList.size() > 0) {
|
|
|
// vip课自动签退
|
|
|
teacherAttendanceDao.updateViPSignOutStatus(courseScheduleIdList.stream().map(a -> a.toString()).collect(Collectors.joining(",")));
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -1288,7 +1288,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
for(Mapper mapper : mapperList){
|
|
|
Map<Integer, String> receivers = new HashMap<Integer, String>();
|
|
|
receivers.put((Integer) mapper.getKey(), mapper.getKey() + "");
|
|
|
-
|
|
|
+
|
|
|
sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_ATTEND_COURSE_MESSAGE, receivers, null, 0, "2", mapper.getValue());
|
|
|
}
|
|
|
}
|