فهرست منبع

管乐迷直播课改动

zouxuan 2 سال پیش
والد
کامیت
7fcdc38b11
20فایلهای تغییر یافته به همراه95 افزوده شده و 339 حذف شده
  1. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java
  2. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java
  3. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleStudentPaymentDao.java
  4. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/GroupDao.java
  5. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDao.java
  6. 2 75
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/VipGroupApplyBaseInfoDto.java
  7. 4 85
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/VipGroupQueryInfo.java
  8. 3 43
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/VipGroupSalaryQueryInfo.java
  9. 3 49
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/VipGroupTeachingRecordQueryInfo.java
  10. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  11. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImUserFriendServiceImpl.java
  12. 34 37
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  13. 3 7
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  14. 1 1
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  15. 1 1
      mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml
  16. 3 3
      mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml
  17. 1 1
      mec-biz/src/main/resources/config/mybatis/GroupMapper.xml
  18. 2 2
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  19. 14 12
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml
  20. 15 14
      mec-web/src/main/java/com/ym/mec/web/controller/VipGroupManageController.java

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java

@@ -292,7 +292,7 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @describe 根据小课获取关联的班级信息
      */
     ClassGroup findByVipGroup(@Param("vipGroupId") Long vipGroupId,
-                              @Param("delFlag") Integer delFlag);
+                              @Param("groupType") String groupType);
 
     /**
      * @return com.ym.mec.biz.dal.entity.ClassGroup

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java

@@ -1428,7 +1428,7 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
     CourseSchedule findFirstCourseWithGroup(@Param("groupId") String groupId,
                                             @Param("groupType") GroupType groupType);
     CourseSchedule findLastCourseWithGroup(@Param("groupId") String groupId,
-                                            @Param("groupType") GroupType groupType);
+                                            @Param("groupType") String groupType);
 
     List<CourseSchedule> findClassGroupLastTeacher(@Param("classGroupIds") List<Integer> classGroupIds);
 

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleStudentPaymentDao.java

@@ -372,7 +372,7 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
      * @author Joburgess
      * @date 2020.06.11
      */
-    List<Map<String, BigDecimal>> findGroupCoursesUnitPrice(@Param("groupType") GroupType groupType,
+    List<Map<String, BigDecimal>> findGroupCoursesUnitPrice(@Param("groupType") String groupType,
                                                             @Param("groupIds") List<String> groupIds);
 
     /**

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/GroupDao.java

@@ -79,7 +79,7 @@ public interface GroupDao {
      * @return java.util.List<com.ym.mec.biz.dal.dto.GroupUserDto>
      */
     List<GroupUserDto> findGroupsStudents(@Param("groupIds") List<String> groupIds,
-                                       @Param("groupType") GroupType groupType);
+                                       @Param("groupType") String groupType);
 
 
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDao.java

@@ -149,7 +149,7 @@ public interface StudentPaymentOrderDao extends BaseDAO<Long, StudentPaymentOrde
      * @author Joburgess
      * @date 2019/12/4
      */
-    BigDecimal sumGroupIncomeFee(@Param("vipGroupId") Long vipGroupId);
+    BigDecimal sumGroupIncomeFee(@Param("vipGroupId") Long vipGroupId, @Param("groupType") String groupType);
 
     List<StudentPaymentOrder> findStudentPaymentOrder(@Param("musicGroupId") String musicGroupId);
 

+ 2 - 75
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/VipGroupApplyBaseInfoDto.java

@@ -4,6 +4,7 @@ import com.ym.mec.biz.dal.entity.VipGroup;
 import com.ym.mec.biz.dal.entity.VipGroupStudentCoursePrice;
 import com.ym.mec.biz.dal.enums.ActivityCourseType;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
 import java.math.BigDecimal;
 import java.util.List;
@@ -12,6 +13,7 @@ import java.util.List;
  * @Author Joburgess
  * @Date 2019/9/21
  */
+@Data
 public class VipGroupApplyBaseInfoDto extends VipGroup {
 
     @ApiModelProperty(value = "科目编号列表")
@@ -29,9 +31,6 @@ public class VipGroupApplyBaseInfoDto extends VipGroup {
     @ApiModelProperty(value = "预计招生人数",hidden = true)
     private Integer expectStudentNum;
 
-//    @ApiModelProperty(value = "教师线上课课酬")
-//    private BigDecimal onlineTeacherSalary;
-
     @ApiModelProperty(value = "教师线下课课酬")
     private BigDecimal offlineTeacherSalary;
 
@@ -43,76 +42,4 @@ public class VipGroupApplyBaseInfoDto extends VipGroup {
 
     @ApiModelProperty(value = "活动课程类型")
     private ActivityCourseType activityCourseType;
-
-    public ActivityCourseType getActivityCourseType() {
-        return activityCourseType;
-    }
-
-    public void setActivityCourseType(ActivityCourseType activityCourseType) {
-        this.activityCourseType = activityCourseType;
-    }
-
-    public Integer getFirstStudentId() {
-        return firstStudentId;
-    }
-
-    public void setFirstStudentId(Integer firstStudentId) {
-        this.firstStudentId = firstStudentId;
-    }
-
-    public List<VipGroupStudentCoursePrice> getVipGroupStudentCoursePrices() {
-        return vipGroupStudentCoursePrices;
-    }
-
-    public void setVipGroupStudentCoursePrices(List<VipGroupStudentCoursePrice> vipGroupStudentCoursePrices) {
-        this.vipGroupStudentCoursePrices = vipGroupStudentCoursePrices;
-    }
-
-    public String getSubjectIdList() {
-        return subjectIdList;
-    }
-
-    public void setSubjectIdList(String subjectIdList) {
-        this.subjectIdList = subjectIdList;
-    }
-
-    public BigDecimal getOfflineTeacherSalary() {
-        return offlineTeacherSalary;
-    }
-
-    public void setOfflineTeacherSalary(BigDecimal offlineTeacherSalary) {
-        this.offlineTeacherSalary = offlineTeacherSalary;
-    }
-
-    public Integer getAllCourseNum() {
-        return allCourseNum;
-    }
-
-    public void setAllCourseNum(Integer allCourseNum) {
-        this.allCourseNum = allCourseNum;
-    }
-
-    public Long getTeacherId() {
-        return teacherId;
-    }
-
-    public void setTeacherId(Long teacherId) {
-        this.teacherId = teacherId;
-    }
-
-    public Integer getExpectStudentNum() {
-        return expectStudentNum;
-    }
-
-    public void setExpectStudentNum(Integer expectStudentNum) {
-        this.expectStudentNum = expectStudentNum;
-    }
-
-    public BigDecimal getSalary() {
-        return salary;
-    }
-
-    public void setSalary(BigDecimal salary) {
-        this.salary = salary;
-    }
 }

+ 4 - 85
mec-biz/src/main/java/com/ym/mec/biz/dal/page/VipGroupQueryInfo.java

@@ -1,15 +1,14 @@
 package com.ym.mec.biz.dal.page;
 
-import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
-
-import java.util.Optional;
+import lombok.Data;
 
 /**
  * @Author Joburgess
  * @Date 2019/10/9
  */
+@Data
 public class VipGroupQueryInfo extends QueryInfo {
 
     private String organId;
@@ -31,86 +30,6 @@ public class VipGroupQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "上课时间,年月日",required = false)
     private String classDate;
 
-    @ApiModelProperty(value = "课程类型分组")
-    private String groupType;
-
-    public String getClassDate() {
-        return classDate;
-    }
-
-    public void setClassDate(String classDate) {
-        this.classDate = classDate;
-    }
-
-    public Boolean getHasEducationalTeacherId() {
-        return hasEducationalTeacherId;
-    }
-
-    public void setHasEducationalTeacherId(Boolean hasEducationalTeacherId) {
-        this.hasEducationalTeacherId = hasEducationalTeacherId;
-    }
-
-    public Integer getEducationalTeacherId() {
-        return educationalTeacherId;
-    }
-
-    public void setEducationalTeacherId(Integer educationalTeacherId) {
-        this.educationalTeacherId = educationalTeacherId;
-    }
-
-    public boolean getIsExport() {
-        return isExport;
-    }
-
-    public void setIsExport(boolean export) {
-        isExport = export;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public Integer getTeacherId() {
-        return teacherId;
-    }
-
-    public void setTeacherId(Integer teacherId) {
-        this.teacherId = teacherId;
-    }
-
-    public Integer getActivityId() {
-        return activityId;
-    }
-
-    public void setActivityId(Integer activityId) {
-        this.activityId = activityId;
-    }
-
-    public Long getVipGroupId() {
-        return vipGroupId;
-    }
-
-    public void setVipGroupId(Long vipGroupId) {
-        this.vipGroupId = vipGroupId;
-    }
-
-    public String getOrganId() {
-        return organId;
-    }
-
-    public void setOrganId(String organId) {
-        this.organId = organId;
-    }
-
-    public String getGroupType() {
-        return Optional.ofNullable(groupType).orElse(GroupType.VIP.getCode());
-    }
-
-    public void setGroupType(String groupType) {
-        this.groupType = groupType;
-    }
+    @ApiModelProperty(value = "课程类型分组",required = true)
+    private String groupType = "VIP";
 }

+ 3 - 43
mec-biz/src/main/java/com/ym/mec/biz/dal/page/VipGroupSalaryQueryInfo.java

@@ -1,16 +1,16 @@
 package com.ym.mec.biz.dal.page;
 
-import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
 import java.util.Date;
-import java.util.Optional;
 
 /**
  * @Author Joburgess
  * @Date 2019/10/11
  */
+@Data
 public class VipGroupSalaryQueryInfo extends QueryInfo {
 
     @ApiModelProperty(value = "vip课编号")
@@ -26,45 +26,5 @@ public class VipGroupSalaryQueryInfo extends QueryInfo {
     private Date endTime;
 
     @ApiModelProperty(value = "课类型")
-    private String groupType;
-
-    public Long getVipGroupId() {
-        return vipGroupId;
-    }
-
-    public void setVipGroupId(Long vipGroupId) {
-        this.vipGroupId = vipGroupId;
-    }
-
-    public Long getOrganId() {
-        return organId;
-    }
-
-    public void setOrganId(Long organId) {
-        this.organId = organId;
-    }
-
-    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 String getGroupType() {
-        return Optional.ofNullable(groupType).orElse(GroupType.VIP.getCode());
-    }
-
-    public void setGroupType(String groupType) {
-        this.groupType = groupType;
-    }
+    private String groupType = "VIP";
 }

+ 3 - 49
mec-biz/src/main/java/com/ym/mec/biz/dal/page/VipGroupTeachingRecordQueryInfo.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.dal.page;
 import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
 import java.util.Date;
 import java.util.Optional;
@@ -11,6 +12,7 @@ import java.util.Optional;
  * @Author Joburgess
  * @Date 2019/10/9
  */
+@Data
 public class VipGroupTeachingRecordQueryInfo extends QueryInfo {
 
     @ApiModelProperty(value = "vip课编号")
@@ -29,53 +31,5 @@ public class VipGroupTeachingRecordQueryInfo extends QueryInfo {
     private String status;
 
     @ApiModelProperty(value = "课类型")
-    private String groupType;
-
-    public Long getVipGroupId() {
-        return vipGroupId;
-    }
-
-    public void setVipGroupId(Long vipGroupId) {
-        this.vipGroupId = vipGroupId;
-    }
-
-    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 String getTeachMode() {
-        return teachMode;
-    }
-
-    public void setTeachMode(String teachMode) {
-        this.teachMode = teachMode;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public String getGroupType() {
-        return Optional.ofNullable(groupType).orElse(GroupType.VIP.getCode());
-    }
-
-    public void setGroupType(String groupType) {
-        this.groupType = groupType;
-    }
+    private String groupType = "VIP";
 }

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -4390,7 +4390,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         PageInfo pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
 
         if (Objects.isNull(queryInfo.getVipGroupId())) {
-            throw new BizException("请指定vip课程");
+            throw new BizException("请指定课程");
         }
 
         Map<String, Object> params = new HashMap<>();
@@ -4398,7 +4398,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
         VipGroup vipGroup = vipGroupDao.get(queryInfo.getVipGroupId());
         if (Objects.isNull(vipGroup)) {
-            throw new BizException("指定的vip课不存在");
+            throw new BizException("指定的课不存在");
         }
 
         List<CourseSchedule> dataList;

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImUserFriendServiceImpl.java

@@ -228,7 +228,7 @@ public class ImUserFriendServiceImpl extends BaseServiceImpl<Long, ImUserFriend>
 			if(studentIds.size() > 0){
 				studentSubjectName = MapUtil.convertMybatisMap(studentRegistrationDao.getStudentSubjectNameByStuIds(musicGroup.getId(),studentIds));
 			}
-		}else if(groupType == VIP){
+		}else if(groupType == VIP || groupType == LIVE){
 			VipGroup vipGroup = vipGroupDao.get(Long.parseLong(musicGroupId));
 			educationIds.add(vipGroup.getEducationalTeacherId());
 		}else if(groupType == PRACTICE){
@@ -272,7 +272,7 @@ public class ImUserFriendServiceImpl extends BaseServiceImpl<Long, ImUserFriend>
 			this.addImUserFriend(educationIds,null,educationRealNameMap,null,studentId,imUserFriends);
 			//学员关联维修技师
 			if(repairUserId != null){
-				if(repairUserId == studentId){
+				if(repairUserId.equals(studentId)){
 					continue;
 				}
 				ImUserFriend imUserFriend = new ImUserFriend();

+ 34 - 37
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -1612,7 +1612,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
         List<VipGroup> dataList = null;
         int count = vipGroupDao.countVipGroupByOrgan(params);
-        if (queryInfo.getIsExport() && count > 50000) {
+        if (queryInfo.isExport() && count > 50000) {
             throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
         }
         if (count > 0) {
@@ -1621,7 +1621,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             dataList = vipGroupDao.findAllByOrgan(params);
             if (dataList != null && dataList.size() > 0) {
                 List<String> vipGroupIds = dataList.stream().map(vipGroup -> String.valueOf(vipGroup.getId())).distinct().collect(Collectors.toList());
-                List<Map<Long, Integer>> vipGroupOverCourses = courseScheduleDao.countGroupOverCourse(vipGroupIds, "VIP");
+                List<Map<Long, Integer>> vipGroupOverCourses = courseScheduleDao.countGroupOverCourse(vipGroupIds, queryInfo.getGroupType());
                 Map<String, Integer> vipGroupOverCourseMaps = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(vipGroupOverCourses)), HashMap.class);
                 List<Integer> educationalTeacherIds = dataList.stream().filter(data -> Objects.nonNull(data.getEducationalTeacherId())).map(VipGroup::getEducationalTeacherId).collect(Collectors.toList());
 
@@ -1631,12 +1631,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
                 Map<String, ClassGroup> vipGroupClassGroupMap = classGroupsByVipGroups.stream().collect(Collectors.toMap(ClassGroup::getMusicGroupId, classGroup -> classGroup));
 
-                Map<String, Long> totalClassTimeMap = MapUtil.convertIntegerMap(courseScheduleDao.countTotalCourseScheduleNum(vipGroupIds, "VIP"));
-                Map<String, Long> currentClassTimeMap = MapUtil.convertIntegerMap(courseScheduleDao.countCourseScheduleNum(vipGroupIds, "VIP"));
+                Map<String, Long> totalClassTimeMap = MapUtil.convertIntegerMap(courseScheduleDao.countTotalCourseScheduleNum(vipGroupIds, queryInfo.getGroupType()));
+                Map<String, Long> currentClassTimeMap = MapUtil.convertIntegerMap(courseScheduleDao.countCourseScheduleNum(vipGroupIds, queryInfo.getGroupType()));
                 Map<String, String> lastOverTimeMap = MapUtil.convertIntegerMap(courseScheduleDao.findLastOverTime(vipGroupIds));
 
-                List<Map<String, BigDecimal>> groupCoursesUnitPriceMaps = courseScheduleStudentPaymentDao.findGroupCoursesUnitPrice(GroupType.VIP, vipGroupIds);
-                Map<String, BigDecimal> groupCoursesUnitPrice = new HashMap<>();
+                List<Map<String, BigDecimal>> groupCoursesUnitPriceMaps = courseScheduleStudentPaymentDao.findGroupCoursesUnitPrice(queryInfo.getGroupType(), vipGroupIds);
+                Map<String, BigDecimal> groupCoursesUnitPrice = new HashMap<>(groupCoursesUnitPriceMaps.size());
                 if (!CollectionUtils.isEmpty(groupCoursesUnitPriceMaps)) {
                     groupCoursesUnitPrice = MapUtil.convertIntegerMap(groupCoursesUnitPriceMaps);
                 }
@@ -1655,8 +1655,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
                 }
 
                 Map<String, List<GroupUserDto>> groupStudentsMap = new HashMap<>();
-                if (queryInfo.getIsExport()) {
-                    List<GroupUserDto> groupsStudents = groupDao.findGroupsStudents(vipGroupIds, GroupType.VIP);
+                if (queryInfo.isExport()) {
+                    List<GroupUserDto> groupsStudents = groupDao.findGroupsStudents(vipGroupIds, queryInfo.getGroupType());
                     groupStudentsMap = groupsStudents.stream().collect(Collectors.groupingBy(GroupUserDto::getGroupId));
                 }
 
@@ -1683,7 +1683,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
                     vipGroup.setCourseUnitPrice(groupCoursesUnitPrice.get(String.valueOf(vipGroup.getId())));
 
-                    if (queryInfo.getIsExport()) {
+                    if (queryInfo.isExport()) {
                         List<GroupUserDto> groupStudents = groupStudentsMap.get(vipGroup.getId().toString());
                         if (!CollectionUtils.isEmpty(groupStudents)) {
                             List<String> userInfos = groupStudents.stream().map(u -> u.getUserName() + "(" + u.getUserId() + ")").collect(Collectors.toList());
@@ -1718,7 +1718,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
     public Map<String, Object> findVipGroupTeachingRecord(VipGroupTeachingRecordQueryInfo queryInfo) {
         Long vipGroupId = queryInfo.getVipGroupId();
         if (Objects.isNull(vipGroupId)) {
-            throw new BizException("请指定vip课程!");
+            throw new BizException("请指定课程组");
         }
         PageInfo pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
         Map<String, Object> params = new HashMap<>();
@@ -1777,7 +1777,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             pageInfo.setTotal(count);
             params.put("offset", pageInfo.getOffset());
             dataList = vipGroupDao.findVipGroupStudents(params);
-            List<StudentApplyRefunds> applyRefunds = studentApplyRefundsDao.findByGroupAndType(queryInfo.getVipGroupId().toString(), GroupType.VIP.getCode());
+            List<StudentApplyRefunds> applyRefunds = studentApplyRefundsDao.findByGroupAndType(queryInfo.getVipGroupId().toString(), queryInfo.getGroupType());
             Map<Integer, List<StudentApplyRefunds>> studentApplyRefundsMap = applyRefunds.stream()
                     .collect(Collectors.groupingBy(StudentApplyRefunds::getUserId));
             dataList.forEach(data -> {
@@ -1856,7 +1856,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
     @Override
     public VipGroupManageDetailDto getVipGroupDetail(Long vipGroupId) {
         if (Objects.isNull(vipGroupId)) {
-            throw new BizException("请指定vip课程");
+            throw new BizException("请指定课程组编号");
         }
         VipGroupManageDetailDto vipGroupBaseInfo = vipGroupDao.getVipGroupBaseInfo(vipGroupId);
         if (Objects.nonNull(vipGroupBaseInfo.getEducationalTeacherId())) {
@@ -2235,7 +2235,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
                     throw new BizException("您无法购买此课程");
                 }
             }
-            ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId.longValue(), null);
+            ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId.longValue(), vipGroup.getGroupType());
             //是否已经购买
             Boolean exist = classGroupStudentMapperDao.existByClassGroupIds(classGroup.getId().toString(), userId);
             if (exist) {
@@ -2773,7 +2773,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             throw new BizException("此学生存在退课申请,请到系统日志中查看");
         }
 
-        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
+        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, vipGroup.getGroupType());
 
         ClassGroupStudentMapper classStudentMapperByUserIdAndClassGroupId = classGroupStudentMapperDao.query(classGroup.getId(),
                 studentId);
@@ -2876,7 +2876,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             throw new BizException("学生 {} {} 存在退课申请", studentId, user.getUsername());
         }
 
-        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
+        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, vipGroup.getGroupType());
 
         ClassGroupStudentMapper classStudentMapperByUserIdAndClassGroupId = classGroupStudentMapperDao.query(classGroup.getId(),
                 studentId);
@@ -2927,7 +2927,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             return;
         }
 
-        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
+        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, vipGroup.getGroupType());
 
         ClassGroupStudentMapper classStudentMapperByUserIdAndClassGroupId = classGroupStudentMapperDao.query(classGroup.getId(),
                 studentId);
@@ -3015,7 +3015,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             throw new BizException("此学生存在退课申请,请到系统日志中查看");
         }
 
-        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
+        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, vipGroup.getGroupType());
 
         ClassGroupStudentMapper classStudentMapperByUserIdAndClassGroupId = classGroupStudentMapperDao.query(classGroup.getId(),
                 studentId);
@@ -3122,7 +3122,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             throw new BizException("课程单价设置错误");
         }
 
-        ClassGroup classGroup = classGroupDao.findByVipGroup(studentRecoverInfo.getVipGroupId().longValue(), null);
+        ClassGroup classGroup = classGroupDao.findByVipGroup(studentRecoverInfo.getVipGroupId().longValue(), vipGroup.getGroupType());
 
         Integer oldTeacherId = vipGroup.getUserId();
         if (Objects.nonNull(studentRecoverInfo.getTeacherId()) && !studentRecoverInfo.getTeacherId().equals(vipGroup.getUserId())) {
@@ -3315,7 +3315,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             throw new BizException("不能对已停止的课程进行此操作");
         }
 
-        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
+        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, vipGroup.getGroupType());
 
         ClassGroupStudentMapper classStudentMapperByUserIdAndClassGroupId = classGroupStudentMapperDao.query(classGroup.getId(), studentId);
 
@@ -3391,7 +3391,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         } else {
             result.put("suplusCourseOriginalFee", bigDecimal);
         }
-        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
+        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, vipGroup.getGroupType());
         if (Objects.isNull(classGroup)) {
             throw new BizException("未找到对应班级");
         }
@@ -3499,17 +3499,13 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
     @Override
     public Map<String, Object> findVipGroupSalarys(VipGroupSalaryQueryInfo queryInfo) {
-
         if (Objects.isNull(queryInfo.getVipGroupId())) {
-            throw new BizException("请指定vip课程!");
+            throw new BizException("请指定课程组");
         }
-
         VipGroup vipGroup = vipGroupDao.get(queryInfo.getVipGroupId());
-
         if (Objects.isNull(vipGroup)) {
-            throw new BizException("未找到指定vip课");
+            throw new BizException("未找到指定课程组");
         }
-
         PageInfo pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
         Map<String, Object> params = new HashMap<String, Object>();
         MapUtil.populateMap(params, queryInfo);
@@ -3561,7 +3557,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             vipGroupSalaryBaseInfo.setTotalSalary(new BigDecimal(0));
         }
 
-        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroup.getId(), null);
+        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroup.getId(), vipGroup.getGroupType());
 
         //扣费笔数
         vipGroupSalaryBaseInfo.setFeeDeductionNum(vipGroupDao.countStudentPaymentNum(classGroup.getId()));
@@ -3572,7 +3568,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             vipGroupSalaryBaseInfo.setTotalFeeDeduction(new BigDecimal(0));
         }
 
-        BigDecimal totalCoursePrice = studentPaymentOrderDao.sumGroupIncomeFee(vipGroup.getId());
+        BigDecimal totalCoursePrice = studentPaymentOrderDao.sumGroupIncomeFee(vipGroup.getId(),vipGroup.getGroupType());
         if (Objects.isNull(totalCoursePrice)) {
             totalCoursePrice = new BigDecimal(0);
         }
@@ -3725,11 +3721,11 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
     @Transactional(rollbackFor = Exception.class)
     public void updateVipGroupBaseInfo(VipGroupApplyBaseInfoDto vipGroupApplyBaseInfo) {
         if (Objects.isNull(vipGroupApplyBaseInfo.getId())) {
-            throw new BizException("请指定vip课");
+            throw new BizException("请指定课");
         }
         VipGroup oldVipGroupInfo = vipGroupDao.get(vipGroupApplyBaseInfo.getId());
         if (Objects.isNull(oldVipGroupInfo)) {
-            throw new BizException("指定的vip课不存在");
+            throw new BizException("指定的课不存在");
         }
         if (Objects.isNull(vipGroupApplyBaseInfo.getId())) {
             return;
@@ -3748,11 +3744,11 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         }
         if (Objects.nonNull(vipGroupApplyBaseInfo.getTeacherSchoolId())) {
             oldVipGroupInfo.setTeacherSchoolId(vipGroupApplyBaseInfo.getTeacherSchoolId());
-            courseScheduleDao.updateCourseSchoolByGroup(oldVipGroupInfo.getId().toString(), GroupType.VIP.getCode(), oldVipGroupInfo.getTeacherSchoolId());
+            courseScheduleDao.updateCourseSchoolByGroup(oldVipGroupInfo.getId().toString(), oldVipGroupInfo.getGroupType(), oldVipGroupInfo.getTeacherSchoolId());
             isChange = true;
         }
         if (Objects.nonNull(vipGroupApplyBaseInfo.getEducationalTeacherId()) && !vipGroupApplyBaseInfo.getEducationalTeacherId().equals(oldVipGroupInfo.getEducationalTeacherId())) {
-            ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(oldVipGroupInfo.getId().toString(), GroupType.VIP.getCode());
+            ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(oldVipGroupInfo.getId().toString(), oldVipGroupInfo.getGroupType());
             if (Objects.nonNull(oldVipGroupInfo.getEducationalTeacherId())) {
 
                 imGroupMemberService.quit(classGroup.getId().toString(), oldVipGroupInfo.getEducationalTeacherId());
@@ -3772,7 +3768,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             oldVipGroupInfo.setUpdateTime(now);
             vipGroupDao.update(oldVipGroupInfo);
         }
-        imUserFriendService.refreshGroupImUserFriend(oldVipGroupInfo.getId().toString(), GroupType.VIP);
+        imUserFriendService.refreshGroupImUserFriend(oldVipGroupInfo.getId().toString(),
+                "VIP".equals(vipGroupApplyBaseInfo.getGroupType())?GroupType.VIP:GroupType.LIVE);
     }
 
     @Override
@@ -3785,7 +3782,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         if (Objects.isNull(vipGroup)) {
             throw new BizException("指定的vip课不存在");
         }
-        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroup.getId(), null);
+        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroup.getId(), vipGroup.getGroupType());
         if (Objects.isNull(classGroup)) {
             throw new BizException("班级不存在");
         }
@@ -3909,7 +3906,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             throw new BizException("未找到指定的vip课程");
         }
 
-        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
+        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, vipGroup.getGroupType());
 
         if (classGroup.getStudentNum() > 0 && (VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))) {
             int num = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupId.toString(), GroupType.VIP);
@@ -4383,13 +4380,13 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
     @Override
     public List<TeacherBasicDto> findTeacherWithVipGroupOrganAndSubject(Long vipGroupId) {
         if (Objects.isNull(vipGroupId)) {
-            throw new BizException("请指定课");
+            throw new BizException("请指定课");
         }
         VipGroup vipGroup = vipGroupDao.get(vipGroupId.longValue());
         if (Objects.isNull(vipGroup)) {
             throw new BizException("未找到指定课程");
         }
-        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId.longValue(), null);
+        ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId.longValue(), vipGroup.getGroupType());
         List<TeacherBasicDto> teacherByOrganAndSubject = teacherDao.findTeacherByOrganAndSubject(vipGroup.getOrganId().toString(), classGroup.getSubjectIdList());
         if (CollectionUtils.isEmpty(teacherByOrganAndSubject)) {
             teacherByOrganAndSubject = new ArrayList<>();

+ 3 - 7
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -626,13 +626,9 @@
     <select id="findByVipGroup" resultMap="ClassGroup">
         SELECT
         cg.*
-        FROM
-        class_group cg
-        WHERE cg.music_group_id_=#{vipGroupId}
-        AND cg.group_type_='VIP'
-        <if test="delFlag!=null">
-            AND cg.del_flag_ = #{delFlag}
-        </if>
+        FROM class_group cg
+        WHERE cg.music_group_id_ = #{vipGroupId}
+        AND cg.group_type_ = #{groupType}
     </select>
 
     <select id="lockClassGroup" resultMap="ClassGroup">

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -2999,7 +2999,7 @@
                cs.leave_student_num_,
                cs.schoole_id_
         FROM course_schedule cs
-        WHERE cs.group_type_ = #{groupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+        WHERE cs.group_type_ = #{groupType}
           AND cs.music_group_id_ = #{groupId}
         ORDER BY CONCAT(cs.class_date_, ' ', cs.start_class_time_) DESC
         LIMIT 1

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -541,7 +541,7 @@
 		FROM
 			course_schedule_student_payment
 		WHERE
-			group_type_ = #{groupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+			group_type_ = #{groupType}
 			AND music_group_id_ IN
 			<foreach collection="groupIds" item="groupId" separator="," open="(" close=")">
 				#{groupId}

+ 3 - 3
mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml

@@ -262,8 +262,8 @@
 
 	<sql id="vipGroupSalaryQueryCondition">
 		<where>
-			vg.id_=#{vipGroupId}
-			<if test="groupType != null">
+			vg.id_ = #{vipGroupId}
+			<if test="groupType != null and groupType != ''">
 				AND cs.group_type_= #{groupType}
 			</if>
 			<if test="startTime!=null and endTime!=null">
@@ -442,7 +442,7 @@
 		FROM
 			course_schedule cs
 			LEFT JOIN course_schedule_teacher_salary csts ON cs.id_ = csts.course_schedule_id_
-		WHERE cs.class_group_id_=#{classGroupId} AND cs.id_ IS NOT NULL AND cs.status_='OVER' AND cs.pre_course_flag_ = 0
+		WHERE cs.class_group_id_ = #{classGroupId} AND cs.id_ IS NOT NULL AND cs.status_='OVER' AND cs.pre_course_flag_ = 0
 		GROUP BY cs.teach_mode_
     </select>
 

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/GroupMapper.xml

@@ -221,7 +221,7 @@
           su.username_
         FROM class_group_student_mapper cgsm
         LEFT JOIN sys_user su ON cgsm.user_id_=su.id_
-        WHERE group_type_=#{groupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+        WHERE group_type_ = #{groupType}
         AND status_ IN ('NORMAL', 'QUIT_SCHOOL')
         AND music_group_id_ IN
         <foreach collection="groupIds" item="groupId" open="(" close=")" separator=",">

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -636,8 +636,8 @@
         (CASE WHEN b.b IS NULL THEN 0 ELSE b.b END) amount_
         FROM
         (SELECT SUM(CASE WHEN expect_amount_ IS NULL THEN 0 ELSE expect_amount_ END) a FROM student_payment_order
-             WHERE group_type_ = 'VIP' AND type_ = 'SMALL_CLASS_TO_BUY' AND music_group_id_ = #{vipGroupId} AND status_ = 'SUCCESS') a,
-        (SELECT SUM(CASE WHEN amount_ IS NULL THEN 0 ELSE amount_ END) b FROM sys_user_cash_account_log WHERE group_id_ = #{vipGroupId} AND group_type_ = 'VIP') b,
+             WHERE group_type_ = #{groupType} AND music_group_id_ = #{vipGroupId} AND status_ = 'SUCCESS') a,
+        (SELECT SUM(CASE WHEN amount_ IS NULL THEN 0 ELSE amount_ END) b FROM sys_user_cash_account_log WHERE group_id_ = #{vipGroupId} AND group_type_ = #{groupType}) b,
         (SELECT SUM(CASE WHEN actual_price_ IS NULL THEN 0 ELSE actual_price_ END) c FROM activity_user_mapper WHERE vip_group_id_ = #{vipGroupId}) c,
         (SELECT SUM(CASE WHEN amount_ IS NULL THEN 0 ELSE amount_ END) d FROM sys_user_cash_account_detail WHERE group_id_ = #{vipGroupId}) d,
         (SELECT SUM(CASE WHEN amount_ IS NULL THEN 0 ELSE amount_ END) e FROM sys_user_courses_account_detail WHERE group_id_ = #{vipGroupId}) e

+ 14 - 12
mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml

@@ -178,8 +178,7 @@
 
     <sql id="vipGroupQueryCondition">
         <where>
-            1=1
-            AND vg.audit_status_='PASS' AND vg.group_status_ != 7 and vg.tenant_id_ = #{tenantId}
+            vg.audit_status_='PASS' AND vg.group_status_ != 7 and vg.tenant_id_ = #{tenantId}
             <if test="search!=null and search!=''">
                 AND (vg.name_ LIKE CONCAT('%',#{search},'%') OR vg.id_= #{search})
             </if>
@@ -204,6 +203,9 @@
             <if test="educationalTeacherId!=null">
                 AND vg.educational_teacher_id_=#{educationalTeacherId}
             </if>
+            <if test="groupType != null and groupType != ''">
+                AND vg.group_type_ = #{groupType}
+            </if>
         </where>
     </sql>
 
@@ -225,7 +227,7 @@
 
     <select id="countVipGroupByOrgan" resultType="int">
         SELECT
-        count(*)
+        count(id_)
         FROM
         vip_group vg
         <include refid="vipGroupQueryCondition"/>
@@ -626,7 +628,7 @@
         FROM class_group cg
                  LEFT JOIN class_group_student_mapper cgsm ON cg.id_ = cgsm.class_group_id_
         WHERE cg.music_group_id_ = #{vipGroupId}
-          AND cg.group_type_ = 'VIP'
+          AND cg.group_type_ = #{groupType}
     </select>
 
     <resultMap id="teachingRecord" type="com.ym.mec.biz.dal.dto.VipGroupCourseSchduleRecordDto">
@@ -650,7 +652,7 @@
     <sql id="teachingRecordQueryCondition">
         <where>
             cs.music_group_id_=#{vipGroupId}
-            <if test="groupType != null">
+            <if test="groupType != null and groupType != ''">
                 AND cs.group_type_= #{groupType}
             </if>
             <if test="startTime!=null and endTime!=null">
@@ -724,7 +726,7 @@
         SELECT SUM(csts.expect_salary_) expectTotalSalary,
                SUM(csts.actual_salary_) totalSalary
         FROM vip_group vg
-                 LEFT JOIN course_schedule cs ON vg.id_ = cs.music_group_id_ AND cs.group_type_ = 'VIP'
+                 LEFT JOIN course_schedule cs ON vg.id_ = cs.music_group_id_ AND cs.group_type_ = vg.group_type_
                  LEFT JOIN course_schedule_teacher_salary csts ON cs.id_ = csts.course_schedule_id_
         WHERE vg.id_ = #{vipGroupId}
           AND cs.id_ IS NOT NULL
@@ -732,7 +734,7 @@
     <select id="countVipGroupDeductionNum" resultType="int">
         SELECT COUNT(csts.id_)
         FROM vip_group vg
-                 LEFT JOIN course_schedule cs ON vg.id_ = cs.music_group_id_ AND cs.group_type_ = 'VIP'
+                 LEFT JOIN course_schedule cs ON vg.id_ = cs.music_group_id_ AND cs.group_type_ = vg.group_type_
                  LEFT JOIN course_schedule_teacher_salary csts ON cs.id_ = csts.course_schedule_id_
         WHERE vg.id_ = #{vipGroupId}
           AND cs.id_ != NULL
@@ -744,7 +746,7 @@
         SELECT cssp.user_id_           as 'key',
                SUM(cssp.expect_price_) as 'value'
         FROM vip_group vg
-                 LEFT JOIN course_schedule cs ON vg.id_ = cs.music_group_id_ AND cs.group_type_ = 'VIP'
+                 LEFT JOIN course_schedule cs ON vg.id_ = cs.music_group_id_ AND cs.group_type_ = vg.group_type_
                  LEFT JOIN course_schedule_student_payment cssp ON cs.id_ = cssp.course_schedule_id_
         WHERE vg.id_ = #{vipGroupId}
           AND cs.status_ = 'NOT_START'
@@ -760,7 +762,7 @@
     <select id="countTeacherVipClass" resultType="java.lang.Integer">
         SELECT COUNT(DISTINCT vg.id_)
         FROM vip_group vg
-                 LEFT JOIN class_group cg ON cg.music_group_id_ = vg.id_ AND cg.group_type_ = 'VIP'
+                 LEFT JOIN class_group cg ON cg.music_group_id_ = vg.id_ AND cg.group_type_ = vg.group_type_
                  LEFT JOIN course_schedule cs ON cs.class_group_id_ = cg.id_
         WHERE cs.actual_teacher_id_ = #{teacherId}
           AND cs.type_ = 'VIP'
@@ -791,7 +793,7 @@
         vg.payment_expire_date_,vg.courses_expire_date_,vg.online_classes_unit_price_,vg.offline_classes_unit_price_,
         cg.total_class_times_,cg.current_class_times_,cg.id_ class_group_id_,cg.student_num_,vg.vip_group_activity_id_
         FROM vip_group vg
-        LEFT JOIN class_group cg ON vg.id_ = cg.music_group_id_ AND cg.group_type_ = 'VIP'
+        LEFT JOIN class_group cg ON vg.id_ = cg.music_group_id_ AND cg.group_type_ = vg.group_type_
         LEFT JOIN course_schedule cs ON cs.class_group_id_ = cg.id_
         WHERE cs.actual_teacher_id_ = #{teacherId} AND cs.type_ = 'VIP' AND cg.del_flag_ = 0 GROUP BY vg.id_,cg.id_
         <include refid="global.limit"/>
@@ -807,7 +809,7 @@
     <select id="findByCourseSchedule" resultMap="VipGroup">
         SELECT vg.*
         FROM vip_group vg
-                 LEFT JOIN course_schedule cs ON vg.id_ = cs.music_group_id_ AND cs.group_type_ = 'VIP'
+        LEFT JOIN course_schedule cs ON vg.id_ = cs.music_group_id_ AND cs.group_type_ = vg.group_type_
         WHERE cs.id_ = #{courseScheduleId}
     </select>
 
@@ -966,7 +968,7 @@
             vg.*
         FROM
             vip_group vg
-            LEFT JOIN course_schedule cs ON cs.group_type_ = 'VIP' AND CONCAT(vg.id_, '') = cs.music_group_id_
+            LEFT JOIN course_schedule cs ON cs.group_type_ = vg.group_type_ AND CONCAT(vg.id_, '') = cs.music_group_id_
         WHERE
             vg.group_status_ = 2
             GROUP BY

+ 15 - 14
mec-web/src/main/java/com/ym/mec/web/controller/VipGroupManageController.java

@@ -84,7 +84,7 @@ public class VipGroupManageController extends BaseController {
                 throw new BizException("此课程组状态暂不支持修改");
             }
         }
-        ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(oldVipGroup.getId().toString(), ClassGroupTypeEnum.VIP.getCode());
+        ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(oldVipGroup.getId().toString(),oldVipGroup.getGroupType());
         if(Objects.isNull(classGroup)){
             throw new BizException("课程信息错误");
         }
@@ -106,7 +106,7 @@ public class VipGroupManageController extends BaseController {
                 userRoleMap.put(vipGroup.getEducationalTeacherId(),"乐团主管");
             }
 
-            CourseSchedule lastCourse = courseScheduleDao.findLastCourseWithGroup(vipGroup.getId().toString(), GroupType.VIP);
+            CourseSchedule lastCourse = courseScheduleDao.findLastCourseWithGroup(vipGroup.getId().toString(),oldVipGroup.getGroupType());
             if(Objects.isNull(lastCourse)){
                 userRoleMap.put(vipGroup.getUserId(),"指导老师");
             }else{
@@ -122,7 +122,8 @@ public class VipGroupManageController extends BaseController {
             }
 
             imGroupService.create(classGroup.getId().toString(), null, classGroup.getName(),
-                    classGroup.getName(), vipGroup.getName(), null, null, GroupType.VIP.getCode(), ImGroup.GroupTypeEnum.VIP);
+                    classGroup.getName(), vipGroup.getName(), null, null,oldVipGroup.getGroupType(),
+                    "VIP".equals(oldVipGroup.getGroupType())?ImGroup.GroupTypeEnum.VIP:ImGroup.GroupTypeEnum.LIVE);
             imGroupMemberService.join(classGroup.getId().toString(), userRoleMap);
             imUserFriendService.refreshGroupImUserFriend(classGroup.getMusicGroupId(),classGroup.getGroupType());
         }
@@ -180,9 +181,9 @@ public class VipGroupManageController extends BaseController {
     }
 
     @ApiOperation(value = "全查询")
-    @GetMapping("/queryAll")
+    @PostMapping("/queryAll")
     @PreAuthorize("@pcs.hasPermissions('vipGroupManage/queryAll')")
-    public Object queryAll(VipGroupQueryInfo queryInfo) {
+    public Object queryAll(@RequestBody VipGroupQueryInfo queryInfo) {
         queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
         return succeed(vipGroupService.findVipGroups(queryInfo));
     }
@@ -196,16 +197,16 @@ public class VipGroupManageController extends BaseController {
     }
 
     @ApiOperation(value = "获取小课学员")
-    @GetMapping(value = "/findVipGroupStudents")
+    @PostMapping(value = "/findVipGroupStudents")
     @PreAuthorize("@pcs.hasPermissions('vipGroupManage/findVipGroupStudents')")
-    public Object findVipGroupStudents(VipGroupQueryInfo queryInfo){
+    public Object findVipGroupStudents(@RequestBody VipGroupQueryInfo queryInfo){
         return succeed(vipGroupService.findVipGroupStudents(queryInfo));
     }
 
     @ApiOperation(value = "获取还有课程余额的学员")
-    @GetMapping(value = "/findHaveCourseBalanceStudents")
+    @PostMapping(value = "/findHaveCourseBalanceStudents")
     @PreAuthorize("@pcs.hasPermissions('vipGroupManage/findHaveCourseBalanceStudents')")
-    public Object findHaveCourseBalanceStudents(VipGroupQueryInfo queryInfo){
+    public Object findHaveCourseBalanceStudents(@RequestBody VipGroupQueryInfo queryInfo){
         queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
         return succeed(vipGroupService.findHaveCourseBalanceStudents(queryInfo));
     }
@@ -323,9 +324,9 @@ public class VipGroupManageController extends BaseController {
 	}
 
     @ApiOperation(value = "获取VIP课教学记录")
-    @GetMapping("/findVipGroupTeachingRecord")
+    @PostMapping("/findVipGroupTeachingRecord")
     @PreAuthorize("@pcs.hasPermissions('vipGroupManage/findVipGroupTeachingRecord')")
-    public Object findVipGroupTeachingRecord(VipGroupTeachingRecordQueryInfo queryInfo){
+    public Object findVipGroupTeachingRecord(@RequestBody VipGroupTeachingRecordQueryInfo queryInfo){
         return succeed(vipGroupService.findVipGroupTeachingRecord(queryInfo));
     }
 
@@ -356,16 +357,16 @@ public class VipGroupManageController extends BaseController {
     }
 
     @ApiOperation(value = "获取vip课财务信息")
-    @GetMapping("/findVipGroupSalarys")
+    @PostMapping("/findVipGroupSalarys")
     @PreAuthorize("@pcs.hasPermissions('vipGroupManage/findVipGroupSalarys')")
-    public Object findVipGroupSalarys(VipGroupSalaryQueryInfo queryInfo){
+    public Object findVipGroupSalarys(@RequestBody VipGroupSalaryQueryInfo queryInfo){
         return succeed(vipGroupService.findVipGroupSalarys(queryInfo));
     }
 
     @ApiOperation(value = "获取当前课程上课学员")
     @GetMapping("/findVipGroupAttendanceStudents")
     @PreAuthorize("@pcs.hasPermissions('vipGroupManage/findVipGroupAttendanceStudents')")
-    public Object findVipGroupStudents(Long courseScheduleId){
+    public Object findVipGroupAttendanceStudents(Long courseScheduleId){
         return succeed(vipGroupService.findVipGroupAttendanceStudents(courseScheduleId));
     }