|
@@ -3160,7 +3160,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
}
|
|
|
PracticeGroup practiceGroup = practiceGroupDao.lockPracticeGroup(practiceGroupId);
|
|
|
if(Objects.isNull(practiceGroup)){
|
|
|
- throw new BizException("此课程组已过期,请重新购买");
|
|
|
+ return BaseController.failed(HttpStatus.DESTINATION_LOCKED, "此课程组已过期,请重新购买");
|
|
|
}
|
|
|
if(!practiceGroup.getGroupStatus().equals(GroupStatusEnum.LOCK)){
|
|
|
throw new BizException("此课程组订单正在支付中");
|
|
@@ -3169,7 +3169,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
Map<DealStatusEnum, List<StudentPaymentOrder>> statusOrderMap = userGroupOrders.stream().collect(Collectors.groupingBy(StudentPaymentOrder::getStatus));
|
|
|
List<StudentPaymentOrder> successOrders=statusOrderMap.get(DealStatusEnum.SUCCESS);
|
|
|
if(!CollectionUtils.isEmpty(successOrders)&&successOrders.size()>0){
|
|
|
- throw new BizException("该订单已经支付成功,请勿重复购买");
|
|
|
+ return BaseController.failed(HttpStatus.DESTINATION_LOCKED, "该订单已经支付成功,请勿重复购买");
|
|
|
}
|
|
|
|
|
|
StudentPaymentOrder latestOrder=userGroupOrders.stream().max(Comparator.comparing(StudentPaymentOrder::getId)).get();
|
|
@@ -3179,7 +3179,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
|
|
|
List<StudentPaymentOrder> ingOrders = statusOrderMap.get(DealStatusEnum.ING);
|
|
|
if(CollectionUtils.isEmpty(ingOrders)||ingOrders.size()<=0){
|
|
|
- throw new BizException("该订单支付失败,请重新购买");
|
|
|
+ return BaseController.failed(HttpStatus.DESTINATION_LOCKED, "该订单支付失败,请重新购买");
|
|
|
}else{
|
|
|
for (StudentPaymentOrder ingOrder : ingOrders) {
|
|
|
ingOrder.setStatus(DealStatusEnum.CLOSE);
|