|
@@ -128,13 +128,13 @@ public class GroupClassServiceImpl implements GroupClassService {
|
|
|
if(CollectionUtils.isEmpty(orders)&&Objects.nonNull(refundAmount)){
|
|
|
throw new BizException("未获取到订单");
|
|
|
}
|
|
|
- if(refundAmount.compareTo(orders.get(0).getExpectAmount())>0){
|
|
|
- throw new BizException("退款不可大于购买金额");
|
|
|
- }
|
|
|
if(!practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL)||practiceGroup.getCoursesExpireDate().before(now)){
|
|
|
throw new BizException("当前课程组不可关闭");
|
|
|
}
|
|
|
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);
|