|  | @@ -24,6 +24,7 @@ import com.ym.mec.im.ImFeignService;
 | 
	
		
			
				|  |  |  import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.collection.MapUtil;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.date.DateUtil;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.slf4j.Logger;
 | 
	
		
			
				|  |  |  import org.slf4j.LoggerFactory;
 | 
	
	
		
			
				|  | @@ -2729,8 +2730,24 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |  	public boolean updateHistoryTeacherSalaryOfOnline() {
 | 
	
		
			
				|  |  | -		//查询所有含有线上课的课程组,线上课节数,实付金额
 | 
	
		
			
				|  |  | +		// 查询所有含有线上课的课程组,线上课节数,实付金额
 | 
	
		
			
				|  |  | +		List<VipCourseStudentInfoDto> list = vipGroupDao.queryVipCourseStudentInfo();
 | 
	
		
			
				|  |  | +		Map<Long, VipCourseStudentInfoDto> map = list.stream().collect(Collectors.toMap(VipCourseStudentInfoDto::getMusicGroupId, e -> e));
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		VipCourseStudentInfoDto dto = null;
 | 
	
		
			
				|  |  | +		// 查询需要修改的课酬记录
 | 
	
		
			
				|  |  | +		List<CourseScheduleTeacherSalary> teacherSalaryList = courseScheduleTeacherSalaryDao.queryOnlineCourseByGroupType(GroupType.VIP);
 | 
	
		
			
				|  |  | +		for (CourseScheduleTeacherSalary ts : teacherSalaryList) {
 | 
	
		
			
				|  |  | +			dto = map.get(ts.getCourseScheduleId());
 | 
	
		
			
				|  |  | +			if (dto != null) {
 | 
	
		
			
				|  |  | +				ts.setExpectSalary(dto.getTotalAmount().divide(new BigDecimal((dto.getTotalCourseTimes() / dto.getStudentNum()))));
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  		
 | 
	
		
			
				|  |  | -		return false;
 | 
	
		
			
				|  |  | +		if(teacherSalaryList.size() > 0){
 | 
	
		
			
				|  |  | +			courseScheduleTeacherSalaryDao.batchUpdateTeacherExpectSalarys(teacherSalaryList);
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		return true;
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  }
 |