Bläddra i källkod

Merge branch 'zx_online_update_1218' of http://git.dayaedu.com/yonge/cooleshow into develop-new

zouxuan 1 dag sedan
förälder
incheckning
8a7b87d068

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

@@ -1599,17 +1599,17 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
         }
 
 
-        List<CourseScheduleStudentPayment> list = courseScheduleStudentPaymentService.list(Wrappers.<CourseScheduleStudentPayment>lambdaQuery()
-                .eq(CourseScheduleStudentPayment::getCourseGroupId, courseGroup.getId()));
-        Set<Long> userIds = list.stream().map(CourseScheduleStudentPayment::getUserId).collect(Collectors.toSet());
-        // 学生
-        Map<Long, com.yonge.cooleshow.biz.dal.entity.SysUser> mapByIds = sysUserService.getMapByIds(new ArrayList<>( userIds));
-
-        Map<Long, String> receivers = new HashMap<>();
-        for (com.yonge.cooleshow.biz.dal.entity.SysUser value : mapByIds.values()) {
-            receivers.put(value.getId(), value.getPhone());
-        }
         try {
+            List<CourseScheduleStudentPayment> list = courseScheduleStudentPaymentService.list(Wrappers.<CourseScheduleStudentPayment>lambdaQuery()
+                    .eq(CourseScheduleStudentPayment::getCourseGroupId, courseGroup.getId()));
+            Set<Long> userIds = list.stream().map(CourseScheduleStudentPayment::getUserId).collect(Collectors.toSet());
+            // 学生
+            Map<Long, com.yonge.cooleshow.biz.dal.entity.SysUser> mapByIds = sysUserService.getMapByIds(new ArrayList<>( userIds));
+
+            Map<Long, String> receivers = new HashMap<>();
+            for (com.yonge.cooleshow.biz.dal.entity.SysUser value : mapByIds.values()) {
+                receivers.put(value.getId(), value.getPhone());
+            }
             sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, success?MessageTypeEnum.GROUP_SUCCESS_STUDENT:MessageTypeEnum.GROUP_FAIL_STUDENT,
                     receivers, null, 0, null, ClientEnum.STUDENT.getCode(), courseGroup.getName());
         } catch (Exception e) {

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

@@ -165,9 +165,10 @@
         su.avatar_ as avatar,
         cs.course_num_ as courseNum,
         cs.complete_course_num_ as completeCourseNum,
-        cs.course_introduce_ as courseIntroduce
+        cs.course_introduce_ as courseIntroduce,
+        cs.max_student_num_ as maxStudentNum
         from (select * from (
-        select cg.course_num_,cg.complete_course_num_,cg.course_introduce_,cg.pre_student_num_,
+        select cg.course_num_,cg.complete_course_num_,cg.course_introduce_,cg.pre_student_num_,cg.max_student_num_,
         cg.background_pic_,cg.im_group_id_,cg.name_,cg.subject_id_,cg.teacher_id_,
         CASE WHEN cg.status_ = 'COMPLETE' THEN cg.status_ WHEN cs.status_ = 'NOT_START' THEN 'NOT_START' ELSE 'ING' END as `status_`,
         cs.type_,cs.course_group_id_,cs.class_date_,cs.start_time_,cs.end_time_,cs.id_,cs.class_num_