|
@@ -161,13 +161,13 @@ public class GroupClassServiceImpl implements GroupClassService {
|
|
}
|
|
}
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
if (groupType.equals(GroupType.PRACTICE)) {
|
|
if (groupType.equals(GroupType.PRACTICE)) {
|
|
- BigDecimal refundAmount = returnFeeDto.getAmount();
|
|
|
|
|
|
+// BigDecimal refundAmount = returnFeeDto.getAmount();
|
|
PracticeGroup practiceGroup = practiceGroupDao.get(groupId);
|
|
PracticeGroup practiceGroup = practiceGroupDao.get(groupId);
|
|
if (Objects.isNull(practiceGroup)) {
|
|
if (Objects.isNull(practiceGroup)) {
|
|
throw new BizException("指定的课程组不存在");
|
|
throw new BizException("指定的课程组不存在");
|
|
}
|
|
}
|
|
List<StudentPaymentOrder> orders = studentPaymentOrderDao.findOrderByGroup(practiceGroup.getId().toString(), GroupType.PRACTICE, DealStatusEnum.SUCCESS);
|
|
List<StudentPaymentOrder> orders = studentPaymentOrderDao.findOrderByGroup(practiceGroup.getId().toString(), GroupType.PRACTICE, DealStatusEnum.SUCCESS);
|
|
- if (CollectionUtils.isEmpty(orders) && Objects.nonNull(refundAmount)) {
|
|
|
|
|
|
+ if (CollectionUtils.isEmpty(orders)) {
|
|
throw new BizException("未获取到订单");
|
|
throw new BizException("未获取到订单");
|
|
}
|
|
}
|
|
if (!practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL) || practiceGroup.getCoursesExpireDate().before(now)) {
|
|
if (!practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL) || practiceGroup.getCoursesExpireDate().before(now)) {
|
|
@@ -178,12 +178,12 @@ public class GroupClassServiceImpl implements GroupClassService {
|
|
if(result.getCode() != 200){
|
|
if(result.getCode() != 200){
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
- if (Objects.nonNull(refundAmount) && refundAmount.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
|
- if (refundAmount.compareTo(orders.get(0).getExpectAmount()) > 0) {
|
|
|
|
- throw new BizException("退款不可大于购买金额");
|
|
|
|
- }
|
|
|
|
- sysUserCashAccountService.updateBalance(practiceGroup.getStudentId(), refundAmount, PlatformCashAccountDetailTypeEnum.REFUNDS, "后台关闭网管课");
|
|
|
|
- }
|
|
|
|
|
|
+// if (Objects.nonNull(refundAmount) && refundAmount.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
|
+// if (refundAmount.compareTo(orders.get(0).getExpectAmount()) > 0) {
|
|
|
|
+// throw new BizException("退款不可大于购买金额");
|
|
|
|
+// }
|
|
|
|
+// sysUserCashAccountService.updateBalance(practiceGroup.getStudentId(), refundAmount, PlatformCashAccountDetailTypeEnum.REFUNDS, "后台关闭网管课");
|
|
|
|
+// }
|
|
cleanGroupInfo(groupId.toString(), GroupType.PRACTICE);
|
|
cleanGroupInfo(groupId.toString(), GroupType.PRACTICE);
|
|
practiceGroup.setMemo("后台关闭网管课");
|
|
practiceGroup.setMemo("后台关闭网管课");
|
|
practiceGroup.setGroupStatus(GroupStatusEnum.CANCEL);
|
|
practiceGroup.setGroupStatus(GroupStatusEnum.CANCEL);
|