zouxuan 1 dzień temu
rodzic
commit
02a0160aea

+ 9 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/MessageTypeEnum.java

@@ -30,10 +30,13 @@ public enum MessageTypeEnum implements BaseEnum<String, MessageTypeEnum> {
 
     TEACHER_DECORATE_HOMEWORK("老师布置作业"),
     TEACHER_DECORATE_HOMEWORK_VIP("老师布置作业"),
+    TEACHER_DECORATE_HOMEWORK_GROUP("老师布置作业"),
     TEACHER_REVIEW_HOMEWORK("老师点评作业"),
     TEACHER_REVIEW_HOMEWORK_VIP("老师点评作业"),
+    TEACHER_REVIEW_HOMEWORK_GROUP("老师点评作业"),
     STUDENT_SUBMIT_HOMEWORK("学员提交作业"),
     STUDENT_SUBMIT_HOMEWORK_VIP("学员提交作业"),
+    STUDENT_SUBMIT_HOMEWORK_GROUP("学员提交作业"),
 
     TEACHER_AUTH_PASS("达人认证通过"),
     SMS_TEACHER_AUTH_PASS("达人认证通过(短信)"),
@@ -58,13 +61,16 @@ public enum MessageTypeEnum implements BaseEnum<String, MessageTypeEnum> {
     TOMORROW_COURSE_REMINDER("明日课程提醒(每晚9点)"),
     STUDENT_PRACTICE_REMINDER("趣纠课提醒(趣纠课开始前20分钟)"),
     STUDENT_VIP_REMINDER("VIP课提醒(VIP课开始前20分钟)"),
+    STUDENT_GROUP_REMINDER("小组课提醒(小组课开始前20分钟)"),
     LIVE_REMINDER("直播课提醒(直播课开始前20分钟)"),
     COURSE_SETTLEMENT("课酬结算(每晚9点)"),
     NOT_EVALUATE_STUDENT_PRACTICE("当日趣纠课未评价/布置作业(每晚9点30,已评价/已布置不发)"),
     STUDENT_EVALUATE_TEACHER_PRACTICE("学员对老师评价"),
     TEACHER_EVALUATE_STUDENT_PRACTICE("老师对学员评价"),
     STUDENT_EVALUATE_TEACHER_VIP("学员对老师评价"),
+    STUDENT_EVALUATE_TEACHER_GROUP("学员对老师评价"),
     TEACHER_EVALUATE_STUDENT_VIP("老师对学员评价"),
+    TEACHER_EVALUATE_STUDENT_GROUP("老师对学员评价"),
     WITHDRAWAL_SUCCESS("结算成功"),
     STUDENT_JOIN_FANSGROUP("学员申请加入粉丝群"),
     STUDENT_AUTOJOIN_FANSGROUP("学员自动加入粉丝群"),
@@ -99,6 +105,7 @@ public enum MessageTypeEnum implements BaseEnum<String, MessageTypeEnum> {
 
     PRACTICE_REMIND("趣纠课提醒(趣纠课开始前20分钟)"),
     VIP_REMIND("VIP课提醒(VIP课开始前20分钟)"),
+    GROUP_REMIND("小组课提醒(小组课开始前20分钟)"),
     LIVE_REMIND("直播课提醒(直播课开始前20分钟)"),
     NOT_EVALUATE_TEACHER_PRACTICE("当日趣纠课未对老师评价(每晚9点,已评价不发)"),
     FANSGROUP_APPLY_SUCCESS("粉丝群申请通过"),
@@ -126,6 +133,7 @@ public enum MessageTypeEnum implements BaseEnum<String, MessageTypeEnum> {
     PIANO_ROOM_ADJUST("琴房课调整"),
     PRACTICE_ADJUST("趣纠课调整"),
     VIP_ADJUST("VIP课调整"),
+    GROUP_ADJUST("小组课调整"),
     ACTIVITY_WIN("获奖消息"),
     PLATFORM_ADD_VIP("会员赠送"),
     PLATFORM_ADD_SVIP("会员赠送"),
@@ -171,6 +179,7 @@ public enum MessageTypeEnum implements BaseEnum<String, MessageTypeEnum> {
     //老师修改课程规划
     TEACHER_UPDATE_COURSE_PLAN("老师修改课程规划"),
     TEACHER_UPDATE_COURSE_PLAN_VIP("老师修改课程规划"),
+    TEACHER_UPDATE_COURSE_PLAN_GROUP("老师修改课程规划"),
     TEACHER_UPDATE_COURSE_PLAN_PIANO_ROOM_CLASS("老师修改课程规划"),
     GROUP_SUCCESS_STUDENT("小组课已成课"),
     GROUP_SUCCESS_TEACHER("小组课已成课"),

+ 1 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/course/CourseTypeEnum.java

@@ -16,6 +16,7 @@ public enum CourseTypeEnum implements BaseEnum<String, CourseTypeEnum> {
     PIANO_ROOM_CLASS("琴房课"),
     VIDEO("视频课"),
     VIP("VIP定制课"),
+    GROUP("小组课"),
     ;
     @EnumValue
     private String code;

+ 2 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseGroupServiceImpl.java

@@ -608,6 +608,8 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
                     messageType = MessageTypeEnum.TEACHER_UPDATE_COURSE_PLAN_VIP;
                 }else if (CourseTypeEnum.valueOf(courseGroup.getType()) == CourseTypeEnum.PIANO_ROOM_CLASS){
                     messageType = MessageTypeEnum.TEACHER_UPDATE_COURSE_PLAN_PIANO_ROOM_CLASS;
+                }else if (CourseTypeEnum.valueOf(courseGroup.getType()) == CourseTypeEnum.GROUP){
+                    messageType = MessageTypeEnum.TEACHER_UPDATE_COURSE_PLAN_GROUP;
                 }
                 sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
                         messageType,

+ 4 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseHomeworkServiceImpl.java

@@ -282,6 +282,8 @@ public class CourseHomeworkServiceImpl extends ServiceImpl<CourseHomeworkDao, Co
         MessageTypeEnum messageType = MessageTypeEnum.TEACHER_DECORATE_HOMEWORK;
         if(CourseTypeEnum.valueOf(courseSchedule.getType()) == CourseTypeEnum.VIP){
             messageType = MessageTypeEnum.TEACHER_DECORATE_HOMEWORK_VIP;
+        }else if(CourseTypeEnum.valueOf(courseSchedule.getType()) == CourseTypeEnum.GROUP){
+            messageType = MessageTypeEnum.TEACHER_DECORATE_HOMEWORK_GROUP;
         }
         SysUser teacher = sysUserFeignService.queryUserById(courseSchedule.getTeacherId());
 //        String url = sysMessageService.selectConfigUrl(MessageTypeEnum.TEACHER_DECORATE_HOMEWORK.getCode(),courseSchedule.getId());
@@ -363,6 +365,8 @@ public class CourseHomeworkServiceImpl extends ServiceImpl<CourseHomeworkDao, Co
         MessageTypeEnum messageType = MessageTypeEnum.TEACHER_REVIEW_HOMEWORK;
         if(courseHomeworkDetailVo.getCourseType() == CourseScheduleEnum.VIP){
             messageType = MessageTypeEnum.TEACHER_REVIEW_HOMEWORK_VIP;
+        }else if(courseHomeworkDetailVo.getCourseType() == CourseScheduleEnum.GROUP){
+            messageType = MessageTypeEnum.TEACHER_REVIEW_HOMEWORK_GROUP;
         }
         studentReceivers.put(student.getId(), student.getPhone());
 //        String url = sysMessageService.selectConfigUrl(MessageTypeEnum.TEACHER_REVIEW_HOMEWORK.getCode(),reviewDto.getCourseScheduleId());

+ 4 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseRepliedServiceImpl.java

@@ -130,6 +130,8 @@ public class CourseRepliedServiceImpl extends ServiceImpl<CourseScheduleRepliedD
             MessageTypeEnum messageType = MessageTypeEnum.TEACHER_EVALUATE_STUDENT_PRACTICE;
             if(courseTypeEnum == CourseTypeEnum.VIP){
                 messageType = MessageTypeEnum.TEACHER_EVALUATE_STUDENT_VIP;
+            }else if (courseTypeEnum == CourseTypeEnum.GROUP){
+                messageType = MessageTypeEnum.TEACHER_EVALUATE_STUDENT_GROUP;
             }
 //            String url = sysMessageService.selectConfigUrl(MessageTypeEnum.TEACHER_EVALUATE_STUDENT_PRACTICE.getCode());
             sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
@@ -151,6 +153,8 @@ public class CourseRepliedServiceImpl extends ServiceImpl<CourseScheduleRepliedD
         MessageTypeEnum messageType = MessageTypeEnum.STUDENT_EVALUATE_TEACHER_PRACTICE;
         if(courseTypeEnum == CourseTypeEnum.VIP){
             messageType = MessageTypeEnum.STUDENT_EVALUATE_TEACHER_VIP;
+        }else if (courseTypeEnum == CourseTypeEnum.GROUP){
+            messageType = MessageTypeEnum.STUDENT_EVALUATE_TEACHER_GROUP;
         }
         try {
             SysUser student = sysUserFeignService.queryUserById(studentId);

+ 6 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -1529,6 +1529,8 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
             MessageTypeEnum messageType = MessageTypeEnum.PRACTICE_ADJUST;
             if(CourseTypeEnum.valueOf(courseGroup.getType()) == CourseTypeEnum.VIP){
                 messageType = MessageTypeEnum.VIP_ADJUST;
+            }else if(CourseTypeEnum.valueOf(courseGroup.getType()) == CourseTypeEnum.GROUP){
+                messageType = MessageTypeEnum.GROUP_ADJUST;
             }
             Map<Long, String> receivers = new HashMap<>();
             receivers.put(studentId, student.getPhone());
@@ -3071,6 +3073,8 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
             MessageTypeEnum messageType = MessageTypeEnum.STUDENT_PRACTICE_REMINDER;
             if(courseScheduleEnum == CourseScheduleEnum.VIP){
                 messageType = MessageTypeEnum.STUDENT_VIP_REMINDER;
+            }else if (courseScheduleEnum == CourseScheduleEnum.GROUP){
+                messageType = MessageTypeEnum.STUDENT_GROUP_REMINDER;
             }
             Map<Long, String> sendTeacherMap = new HashMap<>();
             sendTeacherMap.put(courseSchedule.getTeacherId(),teacherMap.get(courseSchedule.getTeacherId()));
@@ -3089,6 +3093,8 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
             MessageTypeEnum messageType = MessageTypeEnum.PRACTICE_REMIND;
             if(courseScheduleEnum == CourseScheduleEnum.VIP){
                 messageType = MessageTypeEnum.VIP_REMIND;
+            }else if (courseScheduleEnum == CourseScheduleEnum.GROUP){
+                messageType = MessageTypeEnum.GROUP_REMIND;
             }
             Map<Long, String> sendTeacherMap = new HashMap<>(1);
             sendTeacherMap.put(courseSchedule.getUserId(),studentMap.get(courseSchedule.getUserId()));

+ 6 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseStudent.java

@@ -84,5 +84,11 @@ public class CourseStudent implements Serializable {
 
     @ApiModelProperty(value = "课程介绍")
     private String courseIntroduce;
+
+    @ApiModelProperty(value = "学员数量")
+    private Integer studentCount;
+
+    @ApiModelProperty(value = "最大成课人数")
+    private Integer maxStudentNum;
 }
 

+ 3 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -577,7 +577,9 @@
         g.im_group_id_  as imGroupId,
         g.course_introduce_ as courseIntroduce,
         g.course_num_ as courseNum,
-        g.complete_course_num_ as completeCourseNum
+        g.complete_course_num_ as completeCourseNum,
+        IFNULL(g.pre_student_num_, 0) as studentCount,
+        g.max_student_num_ as maxStudentNum
         FROM
         (select * from (
         select cssp.user_id_,cssp.course_id_,cssp.order_no_,cs.type_,