|  | @@ -2647,7 +2647,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              PracticeGroup userLatestPracticeGroup = practiceGroupDao.findUserPracticeGroup(practiceGroupBuyParams.getStudentId(),practiceGroupBuyParams.getGroupId());
 | 
	
		
			
				|  |  |              if(Objects.nonNull(userLatestPracticeGroup)){
 | 
	
		
			
				|  |  | -                if(userLatestPracticeGroup.getCoursesExpireDate().before(now)){
 | 
	
		
			
				|  |  | +                if(userLatestPracticeGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL)&&userLatestPracticeGroup.getCoursesExpireDate().before(now)){
 | 
	
		
			
				|  |  |                      throw new BizException("当前课程组已经无法续费,请选择购买");
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  LocalDate lastExpiredDay=LocalDateTime.ofInstant(userLatestPracticeGroup.getCoursesExpireDate().toInstant(),DateUtil.zoneId).toLocalDate();
 | 
	
	
		
			
				|  | @@ -2989,6 +2989,12 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
 | 
	
		
			
				|  |  |              return;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        Long ingOrderNum=statusOrderNumMap.get(DealStatusEnum.ING);
 | 
	
		
			
				|  |  | +        if(Objects.nonNull(ingOrderNum)&&ingOrderNum>0&&order.getStatus().equals(DealStatusEnum.FAILED)){
 | 
	
		
			
				|  |  | +            studentPaymentOrderDao.update(order);
 | 
	
		
			
				|  |  | +            return;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          if(order.getStatus().equals(DealStatusEnum.SUCCESS)){
 | 
	
		
			
				|  |  |              courseScheduleDao.updateGroupCourseLock(order.getMusicGroupId(),GroupType.PRACTICE,0);
 | 
	
		
			
				|  |  |          }else{
 | 
	
	
		
			
				|  | @@ -3186,13 +3192,14 @@ 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.FAILED_DEPENDENCY, "该课程组已失效,请重新购买");
 | 
	
		
			
				|  |  | -        }else{
 | 
	
		
			
				|  |  | -            for (StudentPaymentOrder ingOrder : ingOrders) {
 | 
	
		
			
				|  |  | -                ingOrder.setStatus(DealStatusEnum.CLOSE);
 | 
	
		
			
				|  |  | -                ingOrder.setMemo("用户重新支付");
 | 
	
		
			
				|  |  | -                studentPaymentOrderDao.update(ingOrder);
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +//        else{
 | 
	
		
			
				|  |  | +//            for (StudentPaymentOrder ingOrder : ingOrders) {
 | 
	
		
			
				|  |  | +//                ingOrder.setStatus(DealStatusEnum.CLOSE);
 | 
	
		
			
				|  |  | +//                ingOrder.setMemo("用户重新支付");
 | 
	
		
			
				|  |  | +//                studentPaymentOrderDao.update(ingOrder);
 | 
	
		
			
				|  |  | +//            }
 | 
	
		
			
				|  |  | +//        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          String orderNo=idGeneratorService.generatorId("payment") + "";
 | 
	
		
			
				|  |  |          String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
 |