|
@@ -1553,7 +1553,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
|
|
|
if (recentCourses !=null &&
|
|
|
(CourseScheduleEnum.PRACTICE.getCode().equals(recentCourses.getCourseType()) || CourseScheduleEnum.VIP.getCode().equals(recentCourses.getCourseType()))) {
|
|
|
- SysUser sysUser = sysUserService.getByUserId(recentCourses.getTeacherId());
|
|
|
+ SysUser sysUser = sysUserService.getByUserId(studentId);
|
|
|
if (sysUser != null) {
|
|
|
recentCourses.setCourseGroupName(recentCourses.getCourseGroupName() + "-" + sysUser.getUsername());
|
|
|
}
|
|
@@ -1567,8 +1567,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
|
|
|
if (coursesPractice == null && coursesLive != null) {
|
|
|
homePage.setRecentCourses(coursesLive);
|
|
|
- } else
|
|
|
- if (coursesPractice != null && coursesLive == null) {
|
|
|
+ } else if (coursesPractice != null && coursesLive == null) {
|
|
|
homePage.setRecentCourses(coursesPractice);
|
|
|
} else
|
|
|
if (coursesPractice != null && coursesLive != null) {
|
|
@@ -1681,14 +1680,20 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
teacherReceivers.put(teacherId, teacher.getPhone());
|
|
|
Map<Long, String> studentReceivers = new HashMap<>();
|
|
|
studentReceivers.put(studentId, student.getPhone());
|
|
|
+ MessageTypeEnum toStudent = MessageTypeEnum.STUDENT_BUY_COURSE_TO_STUDENT;
|
|
|
+ MessageTypeEnum toTeacher = MessageTypeEnum.STUDENT_BUY_COURSE_TO_TEACHER;
|
|
|
+ if (type == CourseScheduleEnum.VIP) {
|
|
|
+ toStudent = MessageTypeEnum.STUDENT_BUY_VIP_COURSE_TO_STUDENT;
|
|
|
+ toTeacher = MessageTypeEnum.STUDENT_BUY_VIP_COURSE_TO_TEACHER;
|
|
|
+ }
|
|
|
|
|
|
- sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.STUDENT_BUY_COURSE_TO_STUDENT,
|
|
|
+ sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, toStudent,
|
|
|
studentReceivers, null, 0, null, ClientEnum.STUDENT.getCode(),
|
|
|
- teacher.getUsername(), courseNum,type.getMsg());
|
|
|
+ teacher.getUsername(), courseNum);
|
|
|
|
|
|
- sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.STUDENT_BUY_COURSE_TO_TEACHER,
|
|
|
+ sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, toTeacher,
|
|
|
teacherReceivers, null, 0, null, ClientEnum.TEACHER.getCode(),
|
|
|
- student.getUsername(), courseNum,type.getMsg());
|
|
|
+ student.getUsername(), courseNum);
|
|
|
}
|
|
|
|
|
|
/**
|