|
@@ -907,7 +907,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
List<String> bySubIds = subjectDao.findBySubIds(vipGroupApplyBaseInfoDto.getSubjectIdList());
|
|
|
StringBuffer className=new StringBuffer();
|
|
|
if(ActivityCourseType.FREE_VIP.equals(vipGroup.getVipGroupApplyBaseInfo().getActivityCourseType())){
|
|
|
- className.append("考前辅导课•");
|
|
|
+ className.append("体验课•");
|
|
|
}else if(Objects.isNull(vipGroupCategory.getMusicTheory())||!vipGroupCategory.getMusicTheory()){
|
|
|
className.append(StringUtils.join(bySubIds,","));
|
|
|
className.append(vipGroupCategory.getName());
|
|
@@ -3078,6 +3078,17 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if(classStudentMapperByUserIdAndClassGroupId.getStatus().equals(ClassGroupStudentStatusEnum.QUIT)){
|
|
|
throw new BizException("当前学生已经是退学状态");
|
|
|
}
|
|
|
+ BigDecimal amount = returnFeeDto.getAmount();
|
|
|
+ if(!classStudentMapperByUserIdAndClassGroupId.getStatus().equals(ClassGroupStudentStatusEnum.QUIT_SCHOOL)){
|
|
|
+ if(Objects.isNull(amount)){
|
|
|
+ throw new BizException("请确定退费金额");
|
|
|
+ }
|
|
|
+ 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);
|
|
@@ -3094,16 +3105,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
classGroupDao.update(classGroup);
|
|
|
return BaseController.succeed();
|
|
|
}
|
|
|
- BigDecimal amount = returnFeeDto.getAmount();
|
|
|
- if(Objects.isNull(amount)){
|
|
|
- throw new BizException("请确定退费金额");
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, BigDecimal> studentSurplusCourseFee = getStudentSurplusCourseFee(vipGroupId, studentId);
|
|
|
- BigDecimal suplusCourseFee = studentSurplusCourseFee.get("suplusCourseOriginalFee");
|
|
|
- if(amount.compareTo(suplusCourseFee) > 0){
|
|
|
- throw new BizException("学员最大可退费金额为{}元", suplusCourseFee.toString());
|
|
|
- }
|
|
|
|
|
|
sysUserCashAccountService.updateBalance(studentId, amount);
|
|
|
SysUserCashAccount sysUserCashAccount = sysUserCashAccountService.get(studentId);
|