|  | @@ -1,9 +1,11 @@
 | 
	
		
			
				|  |  |  package com.ym.mec.biz.service.impl;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import com.alibaba.fastjson.JSON;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.TeacherDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dao.VipGroupActivityDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dto.VipGroupActivityAddDto;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dto.VipGroupSalarySettlementDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.Teacher;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.VipGroupActivity;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.VipGroupActivityService;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.dal.BaseDAO;
 | 
	
	
		
			
				|  | @@ -20,6 +22,8 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  |  	private VipGroupActivityDao vipGroupActivityDao;
 | 
	
		
			
				|  |  | +	@Autowired
 | 
	
		
			
				|  |  | +	private TeacherDao teacherDao;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |  	public BaseDAO<Integer, VipGroupActivity> getDAO() {
 | 
	
	
		
			
				|  | @@ -90,10 +94,24 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  | -	public List<VipGroupActivity> findByVipGroupCategory(Long categoryId) {
 | 
	
		
			
				|  |  | +	public List<VipGroupActivity> findByVipGroupCategory(Long categoryId, Integer teacherId) {
 | 
	
		
			
				|  |  |  		if(Objects.isNull(categoryId)){
 | 
	
		
			
				|  |  |  			throw new BizException("请选择课程形态!");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -		return vipGroupActivityDao.findByCategory(categoryId);
 | 
	
		
			
				|  |  | +		if(Objects.isNull(teacherId)){
 | 
	
		
			
				|  |  | +			throw new BizException("请指定教师");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		Teacher teacher = teacherDao.get(teacherId);
 | 
	
		
			
				|  |  | +		if(Objects.isNull(teacher)){
 | 
	
		
			
				|  |  | +			throw new BizException("未找到指定教师");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		String organIds = "";
 | 
	
		
			
				|  |  | +		if(Objects.nonNull(teacher.getOrganId())){
 | 
	
		
			
				|  |  | +			organIds = teacher.getOrganId();
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		if(Objects.nonNull(teacher.getFlowOrganRange())){
 | 
	
		
			
				|  |  | +			organIds=teacherId+","+teacher.getFlowOrganRange();
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		return vipGroupActivityDao.findByCategory(categoryId,organIds);
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  }
 |