|  | @@ -3163,16 +3163,19 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          PracticeGroup practiceGroup = practiceGroupDao.lockPracticeGroup(practiceGroupId);
 | 
	
		
			
				|  |  |          if(Objects.isNull(practiceGroup)){
 | 
	
		
			
				|  |  | -            return BaseController.failed(HttpStatus.DESTINATION_LOCKED, "此课程组已失效,请重新购买");
 | 
	
		
			
				|  |  | +            return BaseController.failed(HttpStatus.FAILED_DEPENDENCY, "该课程组已失效,请重新购买");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        if(!practiceGroup.getGroupStatus().equals(GroupStatusEnum.LOCK)){
 | 
	
		
			
				|  |  | -            return BaseController.failed(HttpStatus.DESTINATION_LOCKED, "此课程组订单正在支付中");
 | 
	
		
			
				|  |  | +        if(practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL)){
 | 
	
		
			
				|  |  | +            return BaseController.failed(HttpStatus.CREATED, "该订单已经支付成功");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(!practiceGroup.getGroupStatus().equals(GroupStatusEnum.CANCEL)){
 | 
	
		
			
				|  |  | +            return BaseController.failed(HttpStatus.FAILED_DEPENDENCY, "该课程组已失效,请重新购买");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          List<StudentPaymentOrder> userGroupOrders = studentPaymentOrderDao.findUserGroupOrders(userId, practiceGroupId.toString(), GroupType.PRACTICE,null);
 | 
	
		
			
				|  |  |          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){
 | 
	
		
			
				|  |  | -            return BaseController.failed(HttpStatus.DESTINATION_LOCKED, "该订单已经支付成功");
 | 
	
		
			
				|  |  | +            return BaseController.failed(HttpStatus.CREATED, "该订单已经支付成功");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          StudentPaymentOrder latestOrder=userGroupOrders.stream().max(Comparator.comparing(StudentPaymentOrder::getId)).get();
 | 
	
	
		
			
				|  | @@ -3182,7 +3185,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          List<StudentPaymentOrder> ingOrders = statusOrderMap.get(DealStatusEnum.ING);
 | 
	
		
			
				|  |  |          if(CollectionUtils.isEmpty(ingOrders)||ingOrders.size()<=0){
 | 
	
		
			
				|  |  | -            return BaseController.failed(HttpStatus.DESTINATION_LOCKED, "此课程组已失效,请重新购买");
 | 
	
		
			
				|  |  | +            return BaseController.failed(HttpStatus.FAILED_DEPENDENCY, "该课程组已失效,请重新购买");
 | 
	
		
			
				|  |  |          }else{
 | 
	
		
			
				|  |  |              for (StudentPaymentOrder ingOrder : ingOrders) {
 | 
	
		
			
				|  |  |                  ingOrder.setStatus(DealStatusEnum.CLOSE);
 |