|  | @@ -3321,9 +3321,23 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public Map<String, Object> checkExistWaitPayOrder(Integer userId) {
 | 
	
		
			
				|  |  | -        List<PracticeGroup> userLockGroups = practiceGroupDao.findUserStatusPracticeGroups(userId, GroupStatusEnum.LOCK);
 | 
	
		
			
				|  |  | +    public Map<String, Object> checkExistWaitPayOrder(Integer userId, Long groupId) {
 | 
	
		
			
				|  |  | +        List<PracticeGroup> userLockGroups;
 | 
	
		
			
				|  |  |          Map<String, Object> result=new HashMap<>();
 | 
	
		
			
				|  |  | +        if(Objects.nonNull(groupId)){
 | 
	
		
			
				|  |  | +            PracticeGroup practiceGroup = practiceGroupDao.get(groupId);
 | 
	
		
			
				|  |  | +            if(Objects.isNull(practiceGroup)||!practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL)||Objects.isNull(practiceGroup.getBuyMonths())){
 | 
	
		
			
				|  |  | +                result.put("existWaitPayOrder",0);
 | 
	
		
			
				|  |  | +                return result;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            Date date = DateUtil.addSeconds(practiceGroup.getCoursesExpireDate(), 1);
 | 
	
		
			
				|  |  | +            userLockGroups=practiceGroupDao.findUserLockPracticeGroupWithDate(userId,date);
 | 
	
		
			
				|  |  | +        }else{
 | 
	
		
			
				|  |  | +            LocalDate localDate=LocalDate.now();
 | 
	
		
			
				|  |  | +            localDate=localDate.plusDays(1);
 | 
	
		
			
				|  |  | +            Date date = Date.from(localDate.atStartOfDay(DateUtil.zoneId).toInstant());
 | 
	
		
			
				|  |  | +            userLockGroups=practiceGroupDao.findUserLockPracticeGroupWithDateBefore(userId, date);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          if(!CollectionUtils.isEmpty(userLockGroups)){
 | 
	
		
			
				|  |  |              result.put("existWaitPayOrder",1);
 | 
	
		
			
				|  |  |              result.put("groupId", userLockGroups.get(0).getId());
 |