Kaynağa Gözat

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

zouxuan 4 ay önce
ebeveyn
işleme
4d13e1cfe2
26 değiştirilmiş dosya ile 140 ekleme ve 241 silme
  1. 7 2
      cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/AdminCourseGroupController.java
  2. 7 2
      cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/CourseGroupController.java
  3. 1 0
      cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/CourseHomeworkController.java
  4. 6 1
      cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherCourseGroupController.java
  5. 7 1
      cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherCourseScheduleController.java
  6. 5 1
      cooleshow-app/src/main/java/com/yonge/cooleshow/website/controller/CourseGroupController.java
  7. 8 0
      cooleshow-common/src/main/java/com/yonge/cooleshow/common/constant/SysConfigConstant.java
  8. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/CheckCourseTimeDto.java
  9. 10 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/LiveCourseGroupDto.java
  10. 2 2
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/CourseGroupSearch.java
  11. 2 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/OrderSearch.java
  12. 4 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseGroup.java
  13. 3 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/CourseScheduleEnum.java
  14. 6 5
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseGroupServiceImpl.java
  15. 12 4
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java
  16. 7 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/PaymentDivMemberRecordServiceImpl.java
  17. 3 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseGroupVo.java
  18. 5 71
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseRepliedVo.java
  19. 0 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/LiveCourseInfoVo.java
  20. 4 119
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/MyRepliedVo.java
  21. 3 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/TeacherLiveCourseInfoVo.java
  22. 30 20
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml
  23. 0 3
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseHomeworkMapper.xml
  24. 4 3
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  25. 2 1
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleRepliedMapper.xml
  26. 1 1
      pom.xml

+ 7 - 2
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/AdminCourseGroupController.java

@@ -18,6 +18,7 @@ import com.yonge.toolset.mybatis.support.PageUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -43,7 +44,9 @@ public class AdminCourseGroupController extends BaseController {
     @PostMapping(value="/live/list", consumes="application/json", produces="application/json")
     public HttpResponseResult<PageInfo<LiveCourseGroupVo>> teacherList(@Validated(value = LiveCourseGroupSearch.TeacherGroup.class)
                                                                            @RequestBody LiveCourseGroupSearch query) {
-        query.setCourseType(CourseScheduleEnum.LIVE);
+        if(query.getCourseType() == null){
+            query.setCourseType(CourseScheduleEnum.LIVE);
+        }
 
         IPage<LiveCourseGroupVo> liveCourseGroupVoIPage = courseGroupService
                 .selectAdminLivePage(PageUtil.getPage(query), query);
@@ -55,7 +58,9 @@ public class AdminCourseGroupController extends BaseController {
     @PostMapping(value="/live/list/student", consumes="application/json", produces="application/json")
     public HttpResponseResult<PageInfo<LiveCourseGroupVo>> studentList(@Validated(value = LiveCourseGroupSearch.StudentGroup.class)
                                                                            @RequestBody LiveCourseGroupSearch query) {
-        query.setCourseType(CourseScheduleEnum.LIVE);
+        if(query.getCourseType() == null){
+            query.setCourseType(CourseScheduleEnum.LIVE);
+        }
 
         IPage<LiveCourseGroupVo> liveCourseGroupVoIPage = courseGroupService
                 .selectAdminLivePage(PageUtil.getPage(query), query);

+ 7 - 2
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/CourseGroupController.java

@@ -12,10 +12,12 @@ import com.yonge.toolset.base.page.PageInfo;
 import com.yonge.toolset.mybatis.support.PageUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import javax.validation.constraints.NotNull;
 import java.util.List;
 
@@ -28,9 +30,9 @@ import java.util.List;
 @Api(tags = "课程组")
 @Validated
 public class CourseGroupController extends BaseController {
-    @Autowired
+    @Resource
     private CourseGroupService courseGroupService;
-    @Autowired
+    @Resource
     private CourseScheduleService courseScheduleService;
 
     @ApiOperation(value = "课程组管理-趣纠课", notes = "{\n" +
@@ -65,6 +67,9 @@ public class CourseGroupController extends BaseController {
             "}")
     @PostMapping(value = "/live")
     public HttpResponseResult<PageInfo<CourseGroupLiveVo>> selectLiveGroup(@RequestBody CourseGroupSearch search) {
+        if(StringUtils.isEmpty(search.getGroupType())){
+            search.setGroupType("LIVE");
+        }
         return succeed(PageUtil.pageInfo(courseGroupService.selectLiveGroup(PageUtil.getPage(search), search)));
     }
 

+ 1 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/CourseHomeworkController.java

@@ -100,6 +100,7 @@ public class CourseHomeworkController extends BaseController {
         list.add(CourseScheduleEnum.PIANO_ROOM_CLASS);
         list.add(CourseScheduleEnum.PRACTICE);
         list.add(CourseScheduleEnum.VIP);
+        list.add(CourseScheduleEnum.GROUP);
         query.setCourseType(list);
 
         IPage<CourseHomeworkVo> page = courseHomeworkService.selectPage(PageUtil.getPage(query), query);

+ 6 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherCourseGroupController.java

@@ -8,6 +8,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.enums.ClientEnum;
+import com.yonge.cooleshow.biz.dal.enums.CourseScheduleEnum;
 import com.yonge.cooleshow.biz.dal.enums.MessageTypeEnum;
 import com.yonge.cooleshow.biz.dal.service.AppVersionInfoService;
 import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
@@ -65,11 +66,12 @@ public class TeacherCourseGroupController extends BaseController {
             @ApiImplicitParam(name = "groupStatus", dataType = "String", value = "课程组状态  ING(进行中)  NOT_SALE(未开售,未上架) APPLY(报名中,销售中) COMPLETE(已完成) OUT_SALE(已下架)"),
             @ApiImplicitParam(name = "page", dataType = "Integer", value = "页数"),
             @ApiImplicitParam(name = "rows", dataType = "Integer", value = "每页数量"),
+            @ApiImplicitParam(name = "courseType", dataType = "String", value = "课程类型"),
             @ApiImplicitParam(name = "myself", dataType = "Boolean", value = "查看我自己的直播课"),
             @ApiImplicitParam(name = "version", dataType = "String", value = "版本"),
             @ApiImplicitParam(name = "platform", dataType = "Integer", value = "平台"),
     })
-    @ApiOperation("分页查询直播课课程组列表")
+    @ApiOperation("分页查询直播课、小组课 课程组列表")
     @PostMapping("/queryPageCourseGroup")
     public HttpResponseResult<PageInfo<CourseGroupVo>> queryPageLiveCourseGroup(@RequestBody Map<String, Object> param) {
 
@@ -103,6 +105,9 @@ public class TeacherCourseGroupController extends BaseController {
         if (appAuditVersion == YesOrNoEnum.NO && dto.getCoursePrice().compareTo(BigDecimal.ZERO) <= 0) {
             return failed("课程价格不能为0元");
         }
+        if(StringUtils.isEmpty(dto.getCourseType())){
+            dto.setCourseType(CourseScheduleEnum.LIVE.getCode());
+        }
         courseGroupService.addLiveCourse(dto);
         return succeed();
     }

+ 7 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherCourseScheduleController.java

@@ -3,6 +3,7 @@ package com.yonge.cooleshow.teacher.controller;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yonge.cooleshow.biz.dal.dto.search.MyCourseSearch;
 import com.yonge.cooleshow.biz.dal.entity.CourseCalendarEntity;
+import com.yonge.cooleshow.biz.dal.enums.CourseScheduleEnum;
 import com.yonge.cooleshow.biz.dal.service.CourseScheduleService;
 import com.yonge.cooleshow.biz.dal.service.HolidaysFestivalsService;
 import com.yonge.cooleshow.biz.dal.service.SysUserService;
@@ -17,6 +18,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -50,12 +52,14 @@ public class TeacherCourseScheduleController extends BaseController {
             @ApiImplicitParam(name = "classDate", dataType = "Integer", value = "年月"),
             @ApiImplicitParam(name = "status", dataType = "String", value = "课程状态 NOT_START未开始 ING进行中 COMPLETE已完成"),
             @ApiImplicitParam(name = "subjectId", dataType = "Long", value = "声部id"),
+            @ApiImplicitParam(name = "courseType", dataType = "String", value = "课程类型"),
             @ApiImplicitParam(name = "page", dataType = "Integer", value = "页数"),
             @ApiImplicitParam(name = "rows", dataType = "Integer", value = "每页数量"),
     })
     @ApiOperation("老师端-首页-我的课程-直播课")
     @PostMapping("/queryTeacherLiveCourse")
     public HttpResponseResult<PageInfo<TeacherLiveCourseInfoVo>> queryTeacherLiveCourse(@RequestBody Map<String, Object> param) {
+        param.put("type",param.get("courseType") == null? CourseScheduleEnum.LIVE.getCode():param.get("courseType").toString());
         return succeed(courseScheduleService.queryTeacherLiveCourse(param));
     }
 
@@ -100,7 +104,9 @@ public class TeacherCourseScheduleController extends BaseController {
     @PostMapping("/queryTeacherPracticeCourse")
     public HttpResponseResult<PageInfo<MyCourseVo>> queryTeacherPracticeCourse(@RequestBody MyCourseSearch search) {
         search.setTeacherId(sysUserService.getUserId());
-        search.setCourseType("VIP,PRACTICE");
+        if(StringUtils.isEmpty(search.getCourseType())){
+            search.setCourseType("VIP,PRACTICE,GROUP");
+        }
         IPage<MyCourseVo> pages = courseScheduleService.queryTeacherPracticeCourse(PageUtil.getPage(search), search);
         return succeed(PageUtil.pageInfo(pages));
     }

+ 5 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/website/controller/CourseGroupController.java

@@ -4,6 +4,7 @@ package com.yonge.cooleshow.website.controller;
 import com.yonge.cooleshow.biz.dal.dto.CheckCourseTimeDto;
 import com.yonge.cooleshow.biz.dal.dto.LiveCourseGroupDto;
 import com.yonge.cooleshow.biz.dal.entity.CourseTimeEntity;
+import com.yonge.cooleshow.biz.dal.enums.CourseScheduleEnum;
 import com.yonge.cooleshow.biz.dal.service.AppVersionInfoService;
 import com.yonge.cooleshow.biz.dal.service.CourseGroupService;
 import com.yonge.cooleshow.biz.dal.vo.CourseGroupVo;
@@ -17,6 +18,7 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -70,10 +72,12 @@ public class CourseGroupController extends BaseController {
     @ApiOperation("创建直播课程组-新增课程组")
     @PostMapping("/addLiveCourse")
     public HttpResponseResult<Object> addLiveCourse(@RequestBody LiveCourseGroupDto dto) {
-
         if (dto.getCoursePrice().compareTo(BigDecimal.ZERO) <= 0) {
             return failed("课程价格不能为0元");
         }
+        if(StringUtils.isEmpty(dto.getCourseType())){
+            dto.setCourseType(CourseScheduleEnum.LIVE.getCode());
+        }
         courseGroupService.addLiveCourse(dto);
         return succeed();
     }

+ 8 - 0
cooleshow-common/src/main/java/com/yonge/cooleshow/common/constant/SysConfigConstant.java

@@ -57,6 +57,10 @@ public interface SysConfigConstant {
      */
     String PRE_CREATE_VIP_ROOM_MINUTE = "pre_create_vip_course_room_minute";
     /**
+     * 提前XX分钟创建/进入小组课房间时间
+     */
+    String PRE_CREATE_GROUP_ROOM_MINUTE = "pre_create_group_course_room_minute";
+    /**
      * 直播结束后,XX分钟关闭房间
      */
     String DESTROY_EXPIRED_LIVE_ROOM_MINUTE = "destroy_expired_live_room_minute";
@@ -69,6 +73,10 @@ public interface SysConfigConstant {
      */
     String DESTROY_EXPIRED_VIP_ROOM_MINUTE = "destroy_expired_vip_course_room_minute";
     /**
+     * 小组课结束后,XX分钟关闭房间
+     */
+    String DESTROY_EXPIRED_GROUP_ROOM_MINUTE = "destroy_expired_group_course_room_minute";
+    /**
      * 课程结束后,XX天后结算课酬
      */
     String COURSE_SETTLEMENT_TIME_DAY = "course_settlement_time_day";

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/CheckCourseTimeDto.java

@@ -25,7 +25,7 @@ public class CheckCourseTimeDto implements Serializable {
     private Integer loop;
 
     @NotBlank(message = "课程类型不能为空")
-    @ApiModelProperty(value = "PRACTICE:趣纠课,LIVE:直播课")
+    @ApiModelProperty(value = "PRACTICE:趣纠课,LIVE:直播课 GROUP 小组课")
     private String  courseType;
 
     @NotNull(message = "课程数不能为空")

+ 10 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/LiveCourseGroupDto.java

@@ -76,7 +76,8 @@ public class LiveCourseGroupDto implements Serializable {
     @ApiModelProperty(value = "最少成课人数")
     private Integer mixStudentNum;
 
-
+    @ApiModelProperty(value = "课程类型")
+    private String courseType;
 
     @NotNull(message = "课程休息时长不能为空")
     @ApiModelProperty(value = "课程休息时长")
@@ -143,6 +144,14 @@ public class LiveCourseGroupDto implements Serializable {
         }
     }
 
+    public String getCourseType() {
+        return courseType;
+    }
+
+    public void setCourseType(String courseType) {
+        this.courseType = courseType;
+    }
+
     public Integer getCourseFreeMinutes() {
         return courseFreeMinutes;
     }

+ 2 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/CourseGroupSearch.java

@@ -70,6 +70,6 @@ public class CourseGroupSearch extends QueryInfo {
     @ApiModelProperty(value = "是否草稿 (0:否  1:是)",hidden = true)
     private Integer draftFlag;
 
-    @ApiModelProperty(value = "课程组类型 VIP 、PRACTICE")
-    private String groupType = "PRACTICE";
+    @ApiModelProperty(value = "课程组类型 VIP 、PRACTICE、GROUP")
+    private String groupType;
 }

+ 2 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/OrderSearch.java

@@ -22,7 +22,8 @@ public class OrderSearch extends QueryInfo{
 	@ApiModelProperty("下单应用:STUDENT 学生端 TEACHER 老师端")
 	private String orderClient;
 
-	@ApiModelProperty("交易类型:  VIP、开通会员  SVIP、开通会员 PRACTICE、趣纠课购买  LIVE、直播课购买 VIDEO、视频课购买 MUSIC、单曲点播 ACTI_REGIST、活动报名(多选用,分割)、VIP_COURSE VIP定制课、DISCOUNT 畅学卡")
+	@ApiModelProperty("交易类型:  VIP、开通会员  SVIP、开通会员 PRACTICE、趣纠课购买  LIVE、直播课购买 VIDEO、视频课购买 " +
+			"MUSIC、单曲点播 ACTI_REGIST、活动报名(多选用,分割)、VIP_COURSE VIP定制课、DISCOUNT 畅学卡、GROUP 小组课")
 	private String orderType;
 
 	@ApiModelProperty("订单状态 WAIT_PAY 待支付 PAYING 支付中  PAID 已付款 CLOSE 已关闭 FAIL 支付失败 (多选用,分割)")

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

@@ -87,6 +87,10 @@ public class CourseGroup implements Serializable {
     @ApiModelProperty(value = "最少成课人数")
     private Integer mixStudentNum;
 
+    @TableField("max_student_num_")
+    @ApiModelProperty(value = "最大成课人数")
+    private Integer maxStudentNum;
+
     @TableField("pre_student_num_")
     @ApiModelProperty(value = "预计上课人数")
     private Integer preStudentNum;

+ 3 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/CourseScheduleEnum.java

@@ -17,6 +17,8 @@ public enum CourseScheduleEnum implements BaseEnum<String, CourseScheduleEnum> {
     LIVE("直播课"),
     PIANO_ROOM_CLASS("琴房课"),
     VIP("VIP定制课"),
+    //小组课
+    GROUP("小组课"),
     //课程状态
     NOT_START("未开始"),
     ING("进行中"),
@@ -40,7 +42,7 @@ public enum CourseScheduleEnum implements BaseEnum<String, CourseScheduleEnum> {
      * @param errMsg 错误异常
      */
     public static CourseScheduleEnum existCourseType(String code, String errMsg) {
-        CourseScheduleEnum[] values = {PRACTICE, LIVE, PIANO_ROOM_CLASS,VIP};
+        CourseScheduleEnum[] values = {PRACTICE, LIVE, PIANO_ROOM_CLASS,VIP,GROUP};
         existCourse(values, code, errMsg);
         //返回枚举对象
         return CourseScheduleEnum.valueOf(code);

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

@@ -225,7 +225,7 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
      */
     public PageInfo<CourseGroupVo> queryPageLiveCourseGroup(Map<String, Object> param) {
         //查询该月的所有直播课程
-        param.put("type", CourseScheduleEnum.LIVE.getCode());
+        param.put("type", param.get("courseType") == null?CourseScheduleEnum.LIVE.getCode():param.get("courseType").toString());
         Page<CourseGroupVo> pageInfo = PageUtil.getPageInfo(param);
         pageInfo.setAsc("b.created_time_");
         String os = WrapperUtil.toStr(param, "os");
@@ -263,10 +263,10 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
         });
         cacheTime.fastPut(dto.getTeacherId(), timeEntities);
         Date now = new Date();
-        String live = CourseScheduleEnum.LIVE.getCode();
+        String courseType = dto.getCourseType();
         //写入课程组表
         CourseGroup group = new CourseGroup();
-        group.setType(live);
+        group.setType(courseType);
         group.setTeacherId(dto.getTeacherId());
         group.setName(dto.getName());
         group.setSubjectId(dto.getSubjectId());
@@ -290,7 +290,7 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
         dto.getCoursePlanList().forEach(o -> {
             CourseSchedule course = new CourseSchedule();
             course.setCourseGroupId(group.getId());
-            course.setType(live);
+            course.setType(courseType);
             course.setClassNum(o.getClassNum());
             course.setTeacherId(dto.getTeacherId());
             course.setClassDate(o.getStartTime());
@@ -619,7 +619,8 @@ public class CourseGroupServiceImpl extends ServiceImpl<CourseGroupDao, CourseGr
             coursePlanDto.setFreeEndTime(DateUtil.offsetMinute(coursePlanDto.getEndTime(), dto.getCourseFreeMinutes()));
         }
         // true:趣纠课PRACTICE     false:LIVE直播课
-        boolean courseTypeFlag = Lists.newArrayList(CourseScheduleEnum.PRACTICE,CourseScheduleEnum.VIP).contains(CourseScheduleEnum.existCourseType(dto.getCourseType(), "课程类型不正确!"));
+        boolean courseTypeFlag = Lists.newArrayList(CourseScheduleEnum.PRACTICE,CourseScheduleEnum.VIP,CourseScheduleEnum.GROUP)
+                .contains(CourseScheduleEnum.existCourseType(dto.getCourseType(), "课程类型不正确!"));
         //先自校验传入时间是否交集
         List<CourseTimeEntity> timeList = dto.getTimeList();
         if (CollectionUtils.isEmpty(timeList)) {

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

@@ -172,7 +172,6 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
         }
         param.put("status", status);
         param.put("teacherId", sysUserService.getUserId());
-        param.put("type", CourseScheduleEnum.LIVE.getCode());
         param.put("groupState", String.join(",", CourseGroupEnum.ING.getCode(), CourseGroupEnum.COMPLETE.getCode()));
         log.info("queryTeacherLiveCourse:{}", param);
         Page<TeacherLiveCourseInfoVo> pageInfo = PageUtil.getPageInfo(param);
@@ -1035,6 +1034,10 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
     @NotNull
     private Map<String, String> getCourseJoinMap() {
         Map<String, String> sysConfig = new HashMap<>();
+        //提前XX分钟创建/进入GROUP课房间时间
+        sysConfig.put("groupStartTime", sysConfigService.findConfigValue(SysConfigConstant.PRE_CREATE_GROUP_ROOM_MINUTE));
+        //GROUP课结束后,XX分钟关闭房间
+        sysConfig.put("groupEndTime", sysConfigService.findConfigValue(SysConfigConstant.DESTROY_EXPIRED_GROUP_ROOM_MINUTE));
         //提前XX分钟创建/进入VIP课房间时间
         sysConfig.put("vipStartTime", sysConfigService.findConfigValue(SysConfigConstant.PRE_CREATE_VIP_ROOM_MINUTE));
         //VIP课结束后,XX分钟关闭房间
@@ -1567,7 +1570,8 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
             StudentHomePage.RecentCourses recentCourses = baseMapper.selectRecentCourses(studentId);
 
             if (recentCourses !=null &&
-                    (CourseScheduleEnum.PRACTICE.getCode().equals(recentCourses.getCourseType()) || CourseScheduleEnum.VIP.getCode().equals(recentCourses.getCourseType()))) {
+                    (CourseScheduleEnum.PRACTICE.getCode().equals(recentCourses.getCourseType())
+                            || CourseScheduleEnum.VIP.getCode().equals(recentCourses.getCourseType()))) {
                 SysUser sysUser = sysUserService.getByUserId(studentId);
                 if (sysUser != null) {
                     recentCourses.setCourseGroupName(recentCourses.getCourseGroupName() + "-" + sysUser.getUsername());
@@ -1578,7 +1582,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
         if (studentId == null) {
             //vip课和趣纠课
             StudentHomePage.RecentCourses coursesPractice = baseMapper.selectRecentCoursesPractice(teacherId);
-            StudentHomePage.RecentCourses coursesLive = baseMapper.selectRecentCoursesLive(teacherId);//直播课&琴房课共用coursesLive
+            StudentHomePage.RecentCourses coursesLive = baseMapper.selectRecentCoursesLive(teacherId);//直播课&琴房课&小组课共用coursesLive
 
             if (coursesPractice == null && coursesLive != null) {
                 homePage.setRecentCourses(coursesLive);
@@ -1599,7 +1603,8 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
             // 本周未上课程数
 
             if (coursesPractice != null &&
-                    (CourseScheduleEnum.PRACTICE.getCode().equals(coursesPractice.getCourseType()) || CourseScheduleEnum.VIP.getCode().equals(coursesPractice.getCourseType()))) {
+                    (CourseScheduleEnum.PRACTICE.getCode().equals(coursesPractice.getCourseType())
+                            || CourseScheduleEnum.VIP.getCode().equals(coursesPractice.getCourseType()))) {
                 SysUser sysUser = sysUserService.getByUserId(coursesPractice.getStudentId());
                 if (sysUser != null) {
                     coursesPractice.setCourseGroupName(coursesPractice.getCourseGroupName() + "-" + sysUser.getUsername());
@@ -1628,6 +1633,9 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
                 case "VIP":
                     start= Integer.parseInt(courseJoinMap.get("vipStartTime"));
                     break;
+                case "GROUP":
+                    start= Integer.parseInt(courseJoinMap.get("groupStartTime"));
+                    break;
                 default:
                     break;
             }

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

@@ -989,6 +989,9 @@ public class PaymentDivMemberRecordServiceImpl extends ServiceImpl<PaymentDivMem
         }
 
         BigDecimal amount = tenantdivMap.values().stream().reduce(BigDecimal.ZERO, BigDecimal::add);
+        if (amount.compareTo(BigDecimal.ZERO) <= 0) {
+            return;
+        }
         boolean tenantEnterFlag = false;
         //  执行分账
         TenantMember tenantMember = null;
@@ -1044,6 +1047,10 @@ public class PaymentDivMemberRecordServiceImpl extends ServiceImpl<PaymentDivMem
     }
 
     private void teacherShare(UserOrderDetailVo userPaymentOrder, BigDecimal shareFee) {
+
+        if (shareFee.compareTo(BigDecimal.ZERO) <= 0) {
+            return;
+        }
         //获取账期时间
         Date accountPeriodTime = userOrderService.getAccountPeriodTime(userPaymentOrder);
         AccountBizTypeEnum bizTypeEnum;

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseGroupVo.java

@@ -40,6 +40,9 @@ public class CourseGroupVo implements Serializable {
     @ApiModelProperty(value = "课程人数")
     private Integer studentCount;
 
+    @ApiModelProperty(value = "最大成课人数")
+    private Integer maxStudentCount;
+
     @ApiModelProperty(value = "课程图片")
     private String backgroundPic;
 

+ 5 - 71
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseRepliedVo.java

@@ -3,12 +3,15 @@ package com.yonge.cooleshow.biz.dal.vo;
 import com.yonge.cooleshow.biz.dal.entity.CourseScheduleReplied;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
 import java.util.Date;
 
 /**
  * @Author: cy
  * @Date: 2022/4/19
  */
+@Data
 @ApiModel(value = "CourseRepliedVo")
 public class CourseRepliedVo extends CourseScheduleReplied {
     @ApiModelProperty("用户名")
@@ -37,75 +40,6 @@ public class CourseRepliedVo extends CourseScheduleReplied {
     @ApiModelProperty("声部名称")
     private String subjectName;
 
-    public String getRealName() {
-        return realName;
-    }
-
-    public void setRealName(String realName) {
-        this.realName = realName;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getAvatar() {
-        return avatar;
-    }
-
-    public void setAvatar(String avatar) {
-        this.avatar = avatar;
-    }
-
-    public String getClassDate() {
-        return classDate;
-    }
-
-    public void setClassDate(String classDate) {
-        this.classDate = classDate;
-    }
-
-    public String getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
-    }
-
-    public String getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public Integer getSubjectId() {
-        return subjectId;
-    }
-
-    public void setSubjectId(Integer subjectId) {
-        this.subjectId = subjectId;
-    }
-
-    public String getSubjectName() {
-        return subjectName;
-    }
-
-    public void setSubjectName(String subjectName) {
-        this.subjectName = subjectName;
-    }
+    @ApiModelProperty("课程组名称")
+    private String courseGroupName;
 }

+ 0 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/LiveCourseInfoVo.java

@@ -33,7 +33,6 @@ public class LiveCourseInfoVo extends CourseGroupVo implements Serializable {
     @ApiModelProperty("学位认证 0:未认证 1:已认证 ")
     private YesOrNoEnum degreeFlag;
 
-
     @ApiModelProperty("教师资格认证 0:未认证 1:已认证 ")
     private YesOrNoEnum teacherFlag;
 

+ 4 - 119
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/MyRepliedVo.java

@@ -2,6 +2,7 @@ package com.yonge.cooleshow.biz.dal.vo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -11,6 +12,7 @@ import java.util.Date;
  * @Date: 2022/4/13
  */
 @ApiModel(value = "MyRepliedVo")
+@Data
 public class MyRepliedVo implements Serializable {
     @ApiModelProperty(value = "课程id")
     private Long courseId;
@@ -56,123 +58,6 @@ public class MyRepliedVo implements Serializable {
     @ApiModelProperty(value = "学生评价内容")
     private String studentRepliedStr;
 
-    public String getStudentRepliedStr() {
-        return studentRepliedStr;
-    }
-
-    public void setStudentRepliedStr(String studentRepliedStr) {
-        this.studentRepliedStr = studentRepliedStr;
-    }
-
-    public Integer getStudentReplied() {
-        return studentReplied;
-    }
-
-    public void setStudentReplied(Integer studentReplied) {
-        this.studentReplied = studentReplied;
-    }
-
-    public Integer getTeacherReplied() {
-        return teacherReplied;
-    }
-
-    public void setTeacherReplied(Integer teacherReplied) {
-        this.teacherReplied = teacherReplied;
-    }
-
-    public String getRealName() {
-        return realName;
-    }
-
-    public void setRealName(String realName) {
-        this.realName = realName;
-    }
-
-    public Long getCourseId() {
-        return courseId;
-    }
-
-    public void setCourseId(Long courseId) {
-        this.courseId = courseId;
-    }
-
-    public Long getCourseGroupId() {
-        return courseGroupId;
-    }
-
-    public void setCourseGroupId(Long courseGroupId) {
-        this.courseGroupId = courseGroupId;
-    }
-
-    public Long getUserId() {
-        return userId;
-    }
-
-    public void setUserId(Long userId) {
-        this.userId = userId;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getAvatar() {
-        return avatar;
-    }
-
-    public void setAvatar(String avatar) {
-        this.avatar = avatar;
-    }
-
-    public Date getClassDate() {
-        return classDate;
-    }
-
-    public void setClassDate(Date classDate) {
-        this.classDate = classDate;
-    }
-
-    public Date getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(Date startTime) {
-        this.startTime = startTime;
-    }
-
-    public Date getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(Date endTime) {
-        this.endTime = endTime;
-    }
-
-    public Integer getSubjectId() {
-        return subjectId;
-    }
-
-    public void setSubjectId(Integer subjectId) {
-        this.subjectId = subjectId;
-    }
-
-    public String getSubjectName() {
-        return subjectName;
-    }
-
-    public void setSubjectName(String subjectName) {
-        this.subjectName = subjectName;
-    }
-
-    public String getScore() {
-        return score;
-    }
-
-    public void setScore(String score) {
-        this.score = score;
-    }
+    @ApiModelProperty("课程组名称")
+    private String courseGroupName;
 }

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/TeacherLiveCourseInfoVo.java

@@ -49,6 +49,9 @@ public class TeacherLiveCourseInfoVo implements Serializable {
     @ApiModelProperty(value = "课程人数")
     private Integer studentCount;
 
+    @ApiModelProperty(value = "最大成课人数")
+    private Integer maxStudentCount;
+
     @ApiModelProperty(value = "课程图片")
     private String backgroundPic;
 

+ 30 - 20
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml

@@ -17,6 +17,7 @@
         <result column="sales_end_date_" jdbcType="TIMESTAMP" property="salesEndDate"/>
         <result column="background_pic_" jdbcType="VARCHAR" property="backgroundPic"/>
         <result column="mix_student_num_" jdbcType="INTEGER" property="mixStudentNum"/>
+        <result column="max_student_num_" jdbcType="INTEGER" property="maxStudentNum"/>
         <result column="course_start_time_" jdbcType="TIMESTAMP" property="courseStartTime"/>
         <result column="created_by_" jdbcType="INTEGER" property="createdBy"/>
         <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
@@ -32,7 +33,7 @@
         id_
         , type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_,
         complete_course_num_, course_introduce_, course_price_, status_, sales_start_date_,
-        sales_end_date_, background_pic_, mix_student_num_,pre_student_num_, im_group_id_,
+        sales_end_date_, background_pic_, mix_student_num_,max_student_num_,pre_student_num_, im_group_id_,
         course_start_time_, created_by_, created_time_, updated_by_, updated_time_,reason_,course_plan_
     </sql>
 
@@ -40,12 +41,12 @@
             parameterType="com.yonge.cooleshow.biz.dal.entity.CourseGroup">
         insert into course_group(type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_,
         complete_course_num_, course_introduce_, course_price_, status_, sales_start_date_, sales_end_date_, background_pic_,
-        mix_student_num_,pre_student_num_,im_group_id_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_,reason_,course_plan_)
+        mix_student_num_,max_student_num_,pre_student_num_,im_group_id_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_,reason_,course_plan_)
         values
         <foreach collection="entities" item="entity" separator=",">
             (#{entity.type}, #{entity.teacherId}, #{entity.name}, #{entity.subjectId}, #{entity.singleCourseMinutes},
             #{entity.courseNum}, #{entity.completeCourseNum}, #{entity.courseIntroduce}, #{entity.coursePrice}, #{entity.status},
-            #{entity.salesStartDate}, #{entity.salesEndDate}, #{entity.backgroundPic}, #{entity.mixStudentNum},
+            #{entity.salesStartDate}, #{entity.salesEndDate}, #{entity.backgroundPic}, #{entity.mixStudentNum},#{entity.maxStudentNum},
             #{entity.preStudentNum},#{entity.imGroupId},#{entity.courseStartTime}, #{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},
             #{entity.updatedTime},#{entity.reason},#{entity.coursePlan})
         </foreach>
@@ -69,6 +70,7 @@
         b.sales_start_date_           as salesStartDate,
         b.sales_end_date_             as salesEndDate,
         b.mix_student_num_            as mixStudentNum,
+        b.max_student_num_            as maxStudentNum,
         b.im_group_id_              as imGroupId,
         b.reason_ as                   reason,
         b.course_plan_ as coursePlan,
@@ -118,6 +120,7 @@
                         b.sales_start_date_           as salesStartDate,
                         b.sales_end_date_             as salesEndDate,
                         b.mix_student_num_            as mixStudentNum,
+                        b.max_student_num_            as maxStudentNum,
                         b.im_group_id_                as imGroupId,
                         b.reason_ as                   reason,
                         b.course_plan_ as coursePlan,
@@ -155,6 +158,9 @@
             <if test="param.subjectId != null ">
                 and #{param.subjectId} = b.subject_id_
             </if>
+            <if test="param.type != null and param.type != ''">
+                and b.type_ = #{param.type}
+            </if>
         </where>
     </select>
 
@@ -497,23 +503,27 @@
         FROM course_group cg
         LEFT JOIN `subject` sb ON cg.subject_id_=sb.id_
         LEFT JOIN sys_user su ON su.id_=cg.teacher_id_
-        LEFT JOIN (SELECT course_group_id_,COUNT(1) AS count_ FROM course_schedule WHERE type_='LIVE' AND status_='COMPLETE' GROUP BY course_group_id_) cm ON cg.id_=cm.course_group_id_
-        LEFT JOIN (SELECT course_group_id_,start_time_ FROM course_schedule WHERE type_='LIVE' GROUP BY course_group_id_) st ON cg.id_=st.course_group_id_
-        WHERE cg.type_='LIVE'
-        <if test="param.search != null and param.search != ''">
-            AND (
-            cg.id_ LIKE concat('%',#{param.search},'%') OR
-            cg.teacher_id_ LIKE concat('%',#{param.search},'%') OR
-            cg.name_ LIKE concat('%',#{param.search},'%') OR
-            su.username_ LIKE concat('%',#{param.search},'%')
-            )
-        </if>
-        <if test="param.subjectId != null">
-            AND cg.subject_id_ = #{param.subjectId}
-        </if>
-        <if test="param.status != null and param.status != ''">
-            AND cg.status_ = #{param.status}
-        </if>
+        LEFT JOIN (SELECT course_group_id_,COUNT(1) AS count_ FROM course_schedule WHERE type_ = #{param.groupType} AND status_='COMPLETE' GROUP BY course_group_id_) cm ON cg.id_=cm.course_group_id_
+        LEFT JOIN (SELECT course_group_id_,start_time_ FROM course_schedule WHERE type_ = #{param.groupType} GROUP BY course_group_id_) st ON cg.id_=st.course_group_id_
+        <where>
+            <if test="param.search != null and param.search != ''">
+                AND (
+                cg.id_ LIKE concat('%',#{param.search},'%') OR
+                cg.teacher_id_ LIKE concat('%',#{param.search},'%') OR
+                cg.name_ LIKE concat('%',#{param.search},'%') OR
+                su.username_ LIKE concat('%',#{param.search},'%')
+                )
+            </if>
+            <if test="param.subjectId != null">
+                AND cg.subject_id_ = #{param.subjectId}
+            </if>
+            <if test="param.groupType != null and param.groupType != ''">
+                AND cg.type_ = #{param.groupType}
+            </if>
+            <if test="param.status != null and param.status != ''">
+                AND cg.status_ = #{param.status}
+            </if>
+        </where>
     </select>
     <select id="selectLiveGroupStudent" resultType="com.yonge.cooleshow.biz.dal.vo.CourseSchedulePaymentVo">
         SELECT

+ 0 - 3
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseHomeworkMapper.xml

@@ -136,9 +136,6 @@
                     and sch.id_ is not null
                 </if>
             </if>
-            <if test="param.search != null and param.search != ''">
-                and cs.name_ like concat('%',#{param.search},'%')
-            </if>
             <if test="param.courseStatus != null">
                 and cs.status_ = #{param.courseStatus}
             </if>

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

@@ -206,7 +206,7 @@
             cs.status_ AS `status`,
             g.subject_id_ AS subjectId,
             sb.name_ AS subjectName,
-            g.name_ AS courseGroupName,
+            concat(cg.name_,'-第',cs.class_num_,'课') as courseGroupName,
             u.del_flag_ as delFlag,
             p.course_id_ AS courseId,
             p.course_group_id_ AS courseGoupId,
@@ -675,7 +675,8 @@
         FROM video_lesson_group g
         LEFT JOIN sys_user u ON g.teacher_id_=u.id_
         LEFT JOIN `subject` s ON g.lesson_subject_=s.id_
-        LEFT JOIN (SELECT video_lesson_group_id_ ,COUNT(1) AS count_ FROM video_lesson_purchase_record WHERE order_status_='PAID' GROUP BY video_lesson_group_id_) r ON g.id_= r.video_lesson_group_id_
+        LEFT JOIN (SELECT video_lesson_group_id_ ,COUNT(1) AS count_ FROM video_lesson_purchase_record
+                                                                     WHERE order_status_='PAID' GROUP BY video_lesson_group_id_) r ON g.id_= r.video_lesson_group_id_
         WHERE u.del_flag_ = 0 and g.audit_status_='PASS' and g.shelves_flag_ = 1 and #{appAuditVersion} = g.audit_version_
         <if test="subjectId != null">
         	and g.lesson_subject_ = #{subjectId}
@@ -749,7 +750,7 @@
         LEFT JOIN sys_user u ON s.teacher_id_=u.id_
         LEFT JOIN course_group g ON s.course_group_id_=g.id_
         WHERE s.teacher_id_=#{teacherId}
-        AND s.type_ IN ('LIVE','PIANO_ROOM_CLASS')
+        AND s.type_ IN ('LIVE','PIANO_ROOM_CLASS','GROUP')
         AND s.status_ IN ('ING','NOT_START')  and g.status_='ING'
         and date_format(s.class_date_,'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
         ORDER BY ABS(NOW() - s.start_time_) ASC

+ 2 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleRepliedMapper.xml

@@ -125,6 +125,7 @@
             r.course_group_id_ AS courseGroupId,
             r.score_ AS score,
             r.student_replied_ AS studentRepliedStr,
+            concat(g.name_,'-第',s.class_num_,'课') as courseGroupName,
             g.subject_id_ AS subjectId,
             sb.name_ AS subjectName,
             s.class_date_ AS classDate,
@@ -166,7 +167,7 @@
             s.start_time_ AS startTime,
             s.end_time_ AS endTime,
             s.status_ AS status,
-
+            concat(g.name_,'-第',s.class_num_,'课') as courseGroupName,
             g.subject_id_ AS subjectId,
             sb.name_ AS subjectName
         FROM course_schedule_replied t

+ 1 - 1
pom.xml

@@ -23,7 +23,7 @@
 		<google.zxing.version>3.4.0</google.zxing.version>
 		<redisson.version>3.11.5</redisson.version>
 		<maven.test.skip>true</maven.test.skip>
-		<cbs.version>1.0.26</cbs.version>
+		<cbs.version>1.0.27</cbs.version>
 		<microsvc.version>1.1.4</microsvc.version>
 	</properties>