|
@@ -3183,9 +3183,9 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
if(Objects.isNull(practiceGroup)){
|
|
if(Objects.isNull(practiceGroup)){
|
|
return BaseController.failed(HttpStatus.FAILED_DEPENDENCY, "该课程组已失效,请重新购买");
|
|
return BaseController.failed(HttpStatus.FAILED_DEPENDENCY, "该课程组已失效,请重新购买");
|
|
}
|
|
}
|
|
- if(practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL)){
|
|
|
|
- return BaseController.failed(HttpStatus.CREATED, "该订单已经支付成功");
|
|
|
|
- }
|
|
|
|
|
|
+// if(practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL)){
|
|
|
|
+// return BaseController.failed(HttpStatus.CREATED, "该订单已经支付成功");
|
|
|
|
+// }
|
|
if(practiceGroup.getGroupStatus().equals(GroupStatusEnum.CANCEL)){
|
|
if(practiceGroup.getGroupStatus().equals(GroupStatusEnum.CANCEL)){
|
|
return BaseController.failed(HttpStatus.FAILED_DEPENDENCY, "该课程组已失效,请重新购买");
|
|
return BaseController.failed(HttpStatus.FAILED_DEPENDENCY, "该课程组已失效,请重新购买");
|
|
}
|
|
}
|
|
@@ -3193,7 +3193,9 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
Map<DealStatusEnum, List<StudentPaymentOrder>> statusOrderMap = userGroupOrders.stream().collect(Collectors.groupingBy(StudentPaymentOrder::getStatus));
|
|
Map<DealStatusEnum, List<StudentPaymentOrder>> statusOrderMap = userGroupOrders.stream().collect(Collectors.groupingBy(StudentPaymentOrder::getStatus));
|
|
List<StudentPaymentOrder> successOrders=statusOrderMap.get(DealStatusEnum.SUCCESS);
|
|
List<StudentPaymentOrder> successOrders=statusOrderMap.get(DealStatusEnum.SUCCESS);
|
|
if(!CollectionUtils.isEmpty(successOrders)&&successOrders.size()>0){
|
|
if(!CollectionUtils.isEmpty(successOrders)&&successOrders.size()>0){
|
|
- return BaseController.failed(HttpStatus.CREATED, "该订单已经支付成功");
|
|
|
|
|
|
+ Map<String, Object> result=new HashMap<>();
|
|
|
|
+ result.put("orderNo", successOrders.get(0).getOrderNo());
|
|
|
|
+ return BaseController.succeed(result);
|
|
}
|
|
}
|
|
|
|
|
|
StudentPaymentOrder latestOrder=userGroupOrders.stream().max(Comparator.comparing(StudentPaymentOrder::getId)).get();
|
|
StudentPaymentOrder latestOrder=userGroupOrders.stream().max(Comparator.comparing(StudentPaymentOrder::getId)).get();
|
|
@@ -3286,6 +3288,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
if(practiceGroup.getGroupStatus().equals(GroupStatusEnum.LOCK)){
|
|
if(practiceGroup.getGroupStatus().equals(GroupStatusEnum.LOCK)){
|
|
groupService.deleteGroupOtherInfo(groupId.toString(),GroupType.PRACTICE);
|
|
groupService.deleteGroupOtherInfo(groupId.toString(),GroupType.PRACTICE);
|
|
practiceGroup.setGroupStatus(GroupStatusEnum.CANCEL);
|
|
practiceGroup.setGroupStatus(GroupStatusEnum.CANCEL);
|
|
|
|
+ practiceGroupDao.update(practiceGroup);
|
|
}else if(practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL)){
|
|
}else if(practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL)){
|
|
return BaseController.failed(HttpStatus.CREATED, "该订单已经支付成功");
|
|
return BaseController.failed(HttpStatus.CREATED, "该订单已经支付成功");
|
|
}else if(practiceGroup.getGroupStatus().equals(GroupStatusEnum.CANCEL)){
|
|
}else if(practiceGroup.getGroupStatus().equals(GroupStatusEnum.CANCEL)){
|