Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/feature/0529-live' into feature/0529-live

shangke 2 anni fa
parent
commit
88ddc3a0a5

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

@@ -624,7 +624,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
                         Objects.isNull(e.getAmount()) ||
                         Objects.isNull(e.getStudentId()) ||
                         Objects.isNull(e.getVipGroupId())).count();
-                if(count > 0l){
+                if(count > 0L){
                     throw new BizException("表单信息有误,请核实");
                 }
                 for (FinancialExpenditure financialExpenditure : financialExpenditureList) {
@@ -635,7 +635,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
                     returnFeeDto.setConfirmReturnActivityGive(true);
                     returnFeeDto.setGroupId(financialExpenditure.getVipGroupId());
                     returnFeeDto.setVipGroupId(financialExpenditure.getVipGroupId());
-                    if(returnFeeDto.getGroupType() == GroupType.VIP){
+                    if(returnFeeDto.getGroupType() == GroupType.VIP || returnFeeDto.getGroupType() == GroupType.LIVE){
                         vipGroupService.checkApplyRefundForStudentOa(returnFeeDto);
                     }else if(returnFeeDto.getGroupType() == GroupType.COMM || returnFeeDto.getGroupType() == GroupType.PRACTICE){
                         groupClassService.checkCancelGroupOa(returnFeeDto);

+ 14 - 17
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -2871,7 +2871,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         Long vipGroupId = returnFeeDto.getVipGroupId();
         Integer studentId = returnFeeDto.getStudentId();
         if (Objects.isNull(vipGroupId) || Objects.isNull(studentId)) {
-            throw new BizException("请指定课与学生");
+            throw new BizException("请指定课与学生");
         }
         SysUser user = teacherDao.getUser(studentId);
         if (user == null) {
@@ -2892,7 +2892,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             throw new BizException("课程 {} {} 不支持退学", vipGroupId, vipGroup.getName());
         }
 
-        List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), GroupType.VIP.getCode(), studentId);
+        List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(),vipGroup.getGroupType(), studentId);
         if (!CollectionUtils.isEmpty(studentApplyRefunds)) {
             throw new BizException("学生 {} {} 存在退课申请", studentId, user.getUsername());
         }
@@ -2940,10 +2940,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         if (vipGroup.getName().startsWith("考前辅导课")) {
             return;
         }
-
         VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroup.getVipGroupCategoryId());
 
-        List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), GroupType.VIP.getCode(), studentId);
+        List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), vipGroup.getGroupType(), studentId);
         if (!CollectionUtils.isEmpty(studentApplyRefunds)) {
             return;
         }
@@ -2965,20 +2964,18 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             if (Objects.isNull(amount)) {
                 return;
             }
-//			Map<String, BigDecimal> studentSurplusCourseFee = getStudentSurplusCourseFee(vipGroupId, studentId);
-//			BigDecimal suplusCourseFee = studentSurplusCourseFee.get("suplusCourseOriginalFee");
-//			if(amount.compareTo(suplusCourseFee) > 0){
-//				throw new BizException("学员最大可退费金额为{}元", suplusCourseFee.toString());
-//			}
         }
-        //退还活动购买
-//        ActivityUserMapper activityUserMapper = activityUserMapperService.findByStudentId(vipGroup.getId(), studentId);
-//        HttpResponseResult result = groupClassService.quitActivityGive(activityUserMapper, returnFeeDto.getConfirmReturnActivityGive(), vipGroup.getId(), VIP);
+        GroupType groupType = GroupType.VIP;
+        ReturnFeeEnum returnFeeEnum = ReturnFeeEnum.VIP;
+        if("LIVE".equals(vipGroup.getGroupType())){
+            groupType = GroupType.LIVE;
+            returnFeeEnum = ReturnFeeEnum.LIVE;
+        }
 
         if (classStudentMapperByUserIdAndClassGroupId.getStatus().equals(ClassGroupStudentStatusEnum.QUIT_SCHOOL)) {
             classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.QUIT);
             classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
-            studentPauseInfoDao.deleteUserPauseInfoWithGroup(GroupType.VIP, vipGroupId.toString(), studentId);
+            studentPauseInfoDao.deleteUserPauseInfoWithGroup(groupType, vipGroupId.toString(), studentId);
 
             classGroup.setStudentNum(classGroup.getStudentNum() - 1);
             classGroupDao.update(classGroup);
@@ -2988,18 +2985,18 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         //记录日志
         SysUserCashAccountLog sysUserCashAccountLog = new SysUserCashAccountLog();
         sysUserCashAccountLog.setUserId(studentId);
-        sysUserCashAccountLog.setGroupType(VIP);
+        sysUserCashAccountLog.setGroupType(groupType);
         sysUserCashAccountLog.setOrganId(vipGroup.getOrganId());
         sysUserCashAccountLog.setGroupId(vipGroupId.toString());
         sysUserCashAccountLog.setAmount(amount);
-        sysUserCashAccountLog.setReturnFeeType(ReturnFeeEnum.VIP);
-        sysUserCashAccountLog.setComment("OA审批VIP退课");
+        sysUserCashAccountLog.setReturnFeeType(returnFeeEnum);
+        sysUserCashAccountLog.setComment("OA审批" + groupType.getDesc() + "退学");
         sysUserCashAccountLogDao.insert(sysUserCashAccountLog);
 
         classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.QUIT);
         classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
 
-        courseScheduleService.batchDeleteMusicGroupCourseWithStudent(vipGroupId.toString(), studentId, GroupType.VIP);
+        courseScheduleService.batchDeleteMusicGroupCourseWithStudent(vipGroupId.toString(), studentId, groupType);
 
         List<Integer> studentPaymentIds = courseScheduleStudentPaymentDao.findNotStartCourseStudentPaymentIdsWithClassGroupAndStudent(classGroup.getId(), studentId);
         if (!CollectionUtils.isEmpty(studentPaymentIds)) {

+ 0 - 1
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -130,7 +130,6 @@ public class TaskController extends BaseController {
     private TeacherCloudCourseReportService teacherCloudCourseReportService;
     @Autowired
     private LessonExaminationService lessonExaminationService;
-
     @Autowired
     private DegreeService degreeService;