Ver código fonte

增加直播课 课程组明细查询
修改课程表 和课程组表字段

hgw 3 anos atrás
pai
commit
030382c7df
17 arquivos alterados com 174 adições e 35 exclusões
  1. 6 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CoursePlanDao.java
  2. 10 2
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleStudentPaymentDao.java
  3. 12 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseGroup.java
  4. 0 12
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseSchedule.java
  5. 11 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RoomInfoCache.java
  6. 9 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseGroupService.java
  7. 10 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CoursePlanService.java
  8. 11 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseScheduleStudentPaymentService.java
  9. 40 7
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseGroupServiceImpl.java
  10. 14 3
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CoursePlanServiceImpl.java
  11. 14 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleStudentPaymentServiceImpl.java
  12. 1 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/LiveRoomServiceImpl.java
  13. 5 4
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml
  14. 11 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CoursePlanMapper.xml
  15. 4 6
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  16. 10 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml
  17. 6 0
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseGroupController.java

+ 6 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CoursePlanDao.java

@@ -2,6 +2,7 @@ package com.yonge.cooleshow.biz.dal.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.yonge.cooleshow.biz.dal.entity.CoursePlan;
+import com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -16,5 +17,10 @@ public interface CoursePlanDao extends BaseMapper<CoursePlan> {
 
     int insertBatch(@Param("entities") List<CoursePlan> entities);
 
+    /**
+     * 根据课程组id查询课程计划信息
+     */
+    List<LiveCourseInfoVo.PlanVo> queryCoursePlanByGroupId(@Param("groupId") Long groupId);
+
 }
 

+ 10 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleStudentPaymentDao.java

@@ -2,6 +2,7 @@ package com.yonge.cooleshow.biz.dal.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudentPayment;
+import com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -18,14 +19,21 @@ public interface CourseScheduleStudentPaymentDao extends BaseMapper<CourseSchedu
     int insertBatch(@Param("entities") List<CourseScheduleStudentPayment> entities);
 
     /**
-     * @description: 获取学员列表
      * @param courseGroupId
      * @param courseGroupType
      * @return java.util.List<java.lang.Long>
+     * @description: 获取学员列表
      * @author zx
      * @date 2022/3/23 16:18
      */
     Set<Long> queryStudentIds(@Param("courseGroupId") Long courseGroupId,
-                                 @Param("courseGroupType") String courseGroupType);
+                              @Param("courseGroupType") String courseGroupType);
+
+    /**
+     * 根据课程组id查询学员信息
+     *
+     * @param groupId 课程组id
+     */
+    List<LiveCourseInfoVo.CourseBuyStudentVo> queryStudentInfoByGroupId(@Param("groupId") Long groupId);
 }
 

+ 12 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseGroup.java

@@ -75,6 +75,10 @@ public class CourseGroup implements Serializable {
     @ApiModelProperty(value = "最少成课人数")
     private Integer mixStudentNum;
 
+    @TableField("pre_student_num_")
+    @ApiModelProperty(value = "预计上课人数")
+    private Integer preStudentNum;
+
     @TableField("course_start_time_")
     @ApiModelProperty(value = "课程开始时间")
     private Date courseStartTime;
@@ -208,6 +212,14 @@ public class CourseGroup implements Serializable {
         this.mixStudentNum = mixStudentNum;
     }
 
+    public Integer getPreStudentNum() {
+        return preStudentNum;
+    }
+
+    public void setPreStudentNum(Integer preStudentNum) {
+        this.preStudentNum = preStudentNum;
+    }
+
     public Date getCourseStartTime() {
         return courseStartTime;
     }

+ 0 - 12
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseSchedule.java

@@ -61,10 +61,6 @@ public class CourseSchedule implements Serializable {
     @ApiModelProperty(value = "开始锁定的时间")
     private Date lockTime;
 
-    @TableField("pre_student_num_")
-    @ApiModelProperty(value = "预计上课人数")
-    private Integer preStudentNum;
-
     @TableField("ex_student_num_")
     @ApiModelProperty(value = "实际上课人数")
     private Integer exStudentNum;
@@ -166,14 +162,6 @@ public class CourseSchedule implements Serializable {
         this.lockTime = lockTime;
     }
 
-    public Integer getPreStudentNum() {
-        return preStudentNum;
-    }
-
-    public void setPreStudentNum(Integer preStudentNum) {
-        this.preStudentNum = preStudentNum;
-    }
-
     public Integer getExStudentNum() {
         return exStudentNum;
     }

+ 11 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/RoomInfoCache.java

@@ -17,6 +17,9 @@ public class RoomInfoCache implements Serializable {
     @ApiModelProperty(value = "主讲人名称")
     private String speakerName;
 
+    @ApiModelProperty(value = "主讲人头像")
+    private String speakerPic;
+
     @ApiModelProperty(value = "主讲人 0在房间 1不在房间")
     private Integer speakerState;
 
@@ -156,4 +159,12 @@ public class RoomInfoCache implements Serializable {
     public void setLookNum(Integer lookNum) {
         this.lookNum = lookNum;
     }
+
+    public String getSpeakerPic() {
+        return speakerPic;
+    }
+
+    public void setSpeakerPic(String speakerPic) {
+        this.speakerPic = speakerPic;
+    }
 }

+ 9 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseGroupService.java

@@ -7,6 +7,7 @@ import com.yonge.cooleshow.biz.dal.dto.LiveCourseGroupDto;
 import com.yonge.cooleshow.biz.dal.entity.CourseGroup;
 import com.yonge.cooleshow.biz.dal.entity.CourseTimeEntity;
 import com.yonge.cooleshow.biz.dal.vo.CourseGroupVo;
+import com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo;
 import com.yonge.cooleshow.common.page.PageInfo;
 
 import java.util.List;
@@ -23,6 +24,13 @@ public interface CourseGroupService extends IService<CourseGroup> {
     CourseGroupDao getDao();
 
     /**
+     * 查询课程组详情-直播课详情
+     *
+     * @param groupId 课程组id
+     */
+    LiveCourseInfoVo queryLiveCourseInfo(Long groupId);
+
+    /**
      * 分页查询课程组列表
      *
      * @param param 传入参数
@@ -43,7 +51,7 @@ public interface CourseGroupService extends IService<CourseGroup> {
     /**
      * 创建直播课程组-解除锁定课程时间-删除写到缓存当作锁定的课时
      */
-   void unlockCourseToCache(Long teacherId);
+    void unlockCourseToCache(Long teacherId);
 
 }
 

+ 10 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CoursePlanService.java

@@ -3,6 +3,9 @@ package com.yonge.cooleshow.biz.dal.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.yonge.cooleshow.biz.dal.dao.CoursePlanDao;
 import com.yonge.cooleshow.biz.dal.entity.CoursePlan;
+import com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo;
+
+import java.util.List;
 
 /**
  * 课程计划表(CoursePlan)表服务接口
@@ -13,5 +16,12 @@ import com.yonge.cooleshow.biz.dal.entity.CoursePlan;
 public interface CoursePlanService extends IService<CoursePlan> {
 
     CoursePlanDao getDao();
+
+    /**
+     * 根据课程组id查询课程计划信息
+     *
+     * @param groupId 课程组id
+     */
+    List<LiveCourseInfoVo.PlanVo> queryCoursePlanByGroupId(Long groupId);
 }
 

+ 11 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseScheduleStudentPaymentService.java

@@ -3,6 +3,10 @@ package com.yonge.cooleshow.biz.dal.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.yonge.cooleshow.biz.dal.dao.CourseScheduleStudentPaymentDao;
 import com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudentPayment;
+import com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * 课程学生缴费表(CourseScheduleStudentPayment)表服务接口
@@ -13,5 +17,12 @@ import com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudentPayment;
 public interface CourseScheduleStudentPaymentService extends IService<CourseScheduleStudentPayment> {
 
     CourseScheduleStudentPaymentDao getDao();
+
+    /**
+     * 根据课程组id查询学员信息
+     *
+     * @param groupId 课程组id
+     */
+    List<LiveCourseInfoVo.CourseBuyStudentVo> queryStudentInfoByGroupId(@Param("groupId") Long groupId);
 }
 

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

@@ -1,5 +1,12 @@
 package com.yonge.cooleshow.biz.dal.service.impl;
 
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.google.common.collect.Lists;
+
+import java.util.Date;
+
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -18,10 +25,7 @@ import com.yonge.cooleshow.biz.dal.entity.CourseSchedule;
 import com.yonge.cooleshow.biz.dal.entity.CourseTimeEntity;
 import com.yonge.cooleshow.biz.dal.enums.CourseGroupEnum;
 import com.yonge.cooleshow.biz.dal.enums.CourseScheduleEnum;
-import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
-import com.yonge.cooleshow.biz.dal.service.CoursePlanService;
-import com.yonge.cooleshow.biz.dal.service.CourseScheduleService;
-import com.yonge.cooleshow.biz.dal.service.SysConfigService;
+import com.yonge.cooleshow.biz.dal.service.*;
 import com.yonge.cooleshow.biz.dal.support.PageUtil;
 import com.yonge.cooleshow.biz.dal.vo.CourseGroupVo;
 import com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo;
@@ -66,6 +70,11 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
     private CoursePlanService coursePlanService;
     @Autowired
     private SysConfigService sysConfigService;
+    @Autowired
+    private SubjectService subjectService;
+    @Autowired
+    private CourseScheduleStudentPaymentService courseScheduleStudentPaymentService;
+
 
     @Override
     public CourseGroupDao getDao() {
@@ -75,11 +84,35 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
     /**
      * 查询课程组详情-直播课详情
      *
-     * @param groupId
+     * @param groupId 课程组id
      */
-    public void queryLiveCourseInfo(Long groupId) {
+    @Override
+    public LiveCourseInfoVo queryLiveCourseInfo(Long groupId) {
+        CourseGroup group = Optional.ofNullable(groupId).map(this::getById)
+                .orElseThrow(() -> new BizException("课程组信息不存在"));
+
         LiveCourseInfoVo result = new LiveCourseInfoVo();
+        result.setCourseGroupId(group.getId());
+        result.setCourseGroupName(group.getName());
+        result.setCourseStartTime(group.getCourseStartTime());
+        result.setSingleCourseMinutes(group.getSingleCourseMinutes());
+        result.setStatus(group.getStatus());
+        result.setStudentCount(group.getPreStudentNum());
+        result.setBackgroundPic(group.getBackgroundPic());
+        result.setTeacherId(group.getTeacherId());
+        result.setCoursePrice(group.getCoursePrice());
+        result.setCourseNum(group.getCourseNum());
+        result.setCourseIntroduce(group.getCourseIntroduce());
+        Optional.ofNullable(group.getTeacherId()).map(this::getSysUser)
+                .ifPresent(sysUser -> result.setTeacherName(sysUser.getRealName()));
+        Optional.ofNullable(group.getSubjectId()).map(subjectService::get)
+                .ifPresent(subject -> result.setSubjectName(subject.getName()));
+        //课程组计划
+        result.setPlanList(coursePlanService.queryCoursePlanByGroupId(groupId));
+        //课程组学员信息
+        result.setStudentList(courseScheduleStudentPaymentService.queryStudentInfoByGroupId(groupId));
 
+        return result;
     }
 
     /**
@@ -234,7 +267,7 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
      * <p>1.把前面2节课的时间循环+1周直到填满5节课为止
      * <p>2.如果自动排课时的时间和未来课程时间有冲突则继续往后面延续一周
      *
-     * @param teacherId 老师id
+     * @param teacherId      老师id
      * @param totalCourseNum 总课程数量
      * @param paramTimeList  当前课程的时间段
      * @return 自动排课后的全部课时

+ 14 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CoursePlanServiceImpl.java

@@ -4,11 +4,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.yonge.cooleshow.biz.dal.dao.CoursePlanDao;
 import com.yonge.cooleshow.biz.dal.entity.CoursePlan;
 import com.yonge.cooleshow.biz.dal.service.CoursePlanService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
+import com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * 课程计划表(CoursePlan)表服务实现类
@@ -26,5 +27,15 @@ public class CoursePlanServiceImpl extends ServiceImpl<CoursePlanDao, CoursePlan
         return this.baseMapper;
     }
 
+    /**
+     * 根据课程组id查询课程计划信息
+     *
+     * @param groupId 课程组id
+     */
+    @Override
+    public List<LiveCourseInfoVo.PlanVo> queryCoursePlanByGroupId(Long groupId) {
+        return baseMapper.queryCoursePlanByGroupId(groupId);
+    }
+
 }
 

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

@@ -4,12 +4,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.yonge.cooleshow.biz.dal.dao.CourseScheduleStudentPaymentDao;
 import com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudentPayment;
 import com.yonge.cooleshow.biz.dal.service.CourseScheduleStudentPaymentService;
+import com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.List;
+
 /**
  * 课程学生缴费表(CourseScheduleStudentPayment)表服务实现类
  *
@@ -26,5 +29,16 @@ public class CourseScheduleStudentPaymentServiceImpl extends ServiceImpl<CourseS
         return this.baseMapper;
     }
 
+    /**
+     * 根据课程组id查询学员信息
+     *
+     * @param groupId 课程组id
+     */
+    @Override
+    public List<LiveCourseInfoVo.CourseBuyStudentVo> queryStudentInfoByGroupId(Long groupId) {
+        return baseMapper.queryStudentInfoByGroupId(groupId);
+    }
+
+
 }
 

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

@@ -233,6 +233,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
         RoomInfoCache roomCache = new RoomInfoCache();
         roomCache.setSpeakerId(sysUser.getId());
         roomCache.setSpeakerName(sysUser.getRealName());
+        roomCache.setSpeakerPic(sysUser.getAvatar());
         roomCache.setSpeakerState(1);
         roomCache.setRoomUid(room.getRoomUid());
         roomCache.setLiveStartTime(room.getLiveStartTime());

+ 5 - 4
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml

@@ -21,24 +21,25 @@
         <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
         <result column="updated_by_" jdbcType="INTEGER" property="updatedBy"/>
         <result column="updated_time_" jdbcType="TIMESTAMP" property="updatedTime"/>
+        <result column="pre_student_num_" jdbcType="INTEGER" property="preStudentNum"/>
     </resultMap>
 
     <sql id="Base_Column_List">
         id_
-        , type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_, course_introduce_, course_price_, status_, sales_start_date_, sales_end_date_, background_pic_, mix_student_num_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_
+        , type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_, course_introduce_, course_price_, status_, sales_start_date_, sales_end_date_, background_pic_, mix_student_num_,pre_student_num_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_
     </sql>
 
     <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
             parameterType="com.yonge.cooleshow.biz.dal.entity.CourseGroup">
         insert into course_group(type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_,
         course_introduce_, course_price_, status_, sales_start_date_, sales_end_date_, background_pic_,
-        mix_student_num_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_)
+        mix_student_num_,pre_student_num_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_)
         values
         <foreach collection="entities" item="entity" separator=",">
             (#{entity.type}, #{entity.teacherId}, #{entity.name}, #{entity.subjectId}, #{entity.singleCourseMinutes},
             #{entity.courseNum}, #{entity.courseIntroduce}, #{entity.coursePrice}, #{entity.status},
             #{entity.salesStartDate}, #{entity.salesEndDate}, #{entity.backgroundPic}, #{entity.mixStudentNum},
-            #{entity.courseStartTime}, #{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},
+            #{entity.preStudentNum},#{entity.courseStartTime}, #{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},
             #{entity.updatedTime})
         </foreach>
     </insert>
@@ -53,7 +54,7 @@
         b.course_start_time_          as courseStartTime,
         b.single_course_minutes_      as singleCourseMinutes,
         a.status_                     as `status`,
-        ifnull(a.pre_student_num_, 0) as studentCount,
+        ifnull(b.pre_student_num_, 0) as studentCount,
         b.background_pic_             as backgroundPic,
         b.course_price_               as coursePrice,
         b.course_num_                 as courseNum

+ 11 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/CoursePlanMapper.xml

@@ -23,4 +23,15 @@
         </foreach>
     </insert>
 
+    <select id="queryCoursePlanByGroupId" resultType="com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo$PlanVo">
+        select a.plan_,
+               a.class_num_,
+               b.start_time_,
+               b.end_time_
+        from course_plan as a
+                 left join course_schedule as b on a.course_group_id_ = b.course_group_id_
+        where a.course_group_id_ = #{groupId}
+        order by b.start_time_
+    </select>
+
 </mapper>

+ 4 - 6
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -13,7 +13,6 @@
         <result column="end_time_" jdbcType="TIMESTAMP" property="endTime"/>
         <result column="lock_" jdbcType="INTEGER" property="lock"/>
         <result column="lock_time_" jdbcType="TIMESTAMP" property="lockTime"/>
-        <result column="pre_student_num_" jdbcType="INTEGER" property="preStudentNum"/>
         <result column="ex_student_num_" jdbcType="INTEGER" property="exStudentNum"/>
         <result column="created_by_" jdbcType="INTEGER" property="createdBy"/>
         <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
@@ -23,18 +22,18 @@
 
     <sql id="Base_Column_List">
         id_
-        , course_group_id_, type_, status_,class_num_, teacher_id_, class_date_, start_time_, end_time_, lock_, lock_time_, pre_student_num_, ex_student_num_, created_by_, created_time_, updated_by_, updated_time_
+        , course_group_id_, type_, status_,class_num_, teacher_id_, class_date_, start_time_, end_time_, lock_, lock_time_, ex_student_num_, created_by_, created_time_, updated_by_, updated_time_
     </sql>
 
     <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
             parameterType="com.yonge.cooleshow.biz.dal.entity.CourseSchedule">
         insert into course_schedule(course_group_id_, type_, status_,class_num_, teacher_id_, class_date_, start_time_,
-        end_time_, lock_, lock_time_, pre_student_num_, ex_student_num_, created_by_, created_time_, updated_by_,
+        end_time_, lock_, lock_time_, ex_student_num_, created_by_, created_time_, updated_by_,
         updated_time_)
         values
         <foreach collection="entities" item="entity" separator=",">
             (#{entity.courseGroupId}, #{entity.type}, #{entity.status},#{entity.classNum}, #{entity.teacherId}, #{entity.classDate},
-            #{entity.startTime}, #{entity.endTime}, #{entity.lock}, #{entity.lockTime}, #{entity.preStudentNum},
+            #{entity.startTime}, #{entity.endTime}, #{entity.lock}, #{entity.lockTime},
             #{entity.exStudentNum}, #{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},
             #{entity.updatedTime})
         </foreach>
@@ -84,7 +83,6 @@
                b.end_time_,
                b.lock_,
                b.lock_time_,
-               b.pre_student_num_,
                b.ex_student_num_,
                b.status_,
                b.created_by_,
@@ -108,7 +106,7 @@
         a.start_time_ as startTime,
         a.end_time_ as endTime,
         a.status_ as `status`,
-        a.pre_student_num_ as studentCount,
+        b.pre_student_num_ as studentCount,
         b.background_pic_ as backgroundPic
         from course_schedule as a
         left join course_group as b on a.course_group_id_ = b.id_

+ 10 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -31,6 +31,7 @@
             #{entity.courseType})
         </foreach>
     </insert>
+
     <select id="queryStudentIds" resultType="java.lang.Long">
         SELECT DISTINCT user_id_ FROM course_schedule_student_payment
         <where>
@@ -43,4 +44,13 @@
         </where>
     </select>
 
+    <select id="queryStudentInfoByGroupId" resultType="com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo$CourseBuyStudentVo">
+        select a.user_id_      as studentId,
+               b.real_name_    as studentName,
+               a.created_time_ as createTime
+        from course_schedule_student_payment as a
+                 left join sys_user as b on a.user_id_ = b.id_
+        where a.course_group_id_ = #{groupId}
+    </select>
+
 </mapper>

+ 6 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseGroupController.java

@@ -6,6 +6,7 @@ import com.yonge.cooleshow.biz.dal.dto.LiveCourseGroupDto;
 import com.yonge.cooleshow.biz.dal.entity.CourseTimeEntity;
 import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
 import com.yonge.cooleshow.biz.dal.vo.CourseGroupVo;
+import com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import com.yonge.cooleshow.common.page.PageInfo;
@@ -35,6 +36,11 @@ public class CourseGroupController extends BaseController {
     @Resource
     private CourseGroupService courseGroupService;
 
+    @ApiOperation("直播课详情")
+    @GetMapping("/queryLiveCourseInfo")
+    public HttpResponseResult<LiveCourseInfoVo> queryLiveCourseInfo(@RequestParam(value = "groupId", name = "课程组id") Long groupId) {
+        return succeed(courseGroupService.queryLiveCourseInfo(groupId));
+    }
 
     @ApiImplicitParams({
             @ApiImplicitParam(name = "teacherId", dataType = "Long", value = "老师id"),