| 
					
				 | 
			
			
				@@ -170,9 +170,11 @@ public class CourseReviewServiceImpl extends BaseServiceImpl<Integer, CourseSche 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             courseHomework.setGroupType(courseSchedule.getGroupType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             courseHomework.setClassGroupId(courseSchedule.getClassGroupId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             courseHomework.setExpiryDate(DateUtil.addDays(date,7)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            courseHomework.setExpectNum(courseScheduleDao.countCourseStudentNum(courseSchedule.getId())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            courseHomeworkService.insert(courseHomework); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             List<CourseScheduleStudentPayment> courseScheduleStudentPayments = courseScheduleStudentPaymentDao.findByCourseSchedule(courseSchedule.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            courseHomework.setExpectNum(CollectionUtils.isEmpty(courseScheduleStudentPayments)?0:courseScheduleStudentPayments.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            courseHomeworkService.insert(courseHomework); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if(!CollectionUtils.isEmpty(courseScheduleStudentPayments)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<StudentCourseHomework> studentCourseHomeworks=new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 for (CourseScheduleStudentPayment courseScheduleStudentPayment : courseScheduleStudentPayments) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -235,6 +237,15 @@ public class CourseReviewServiceImpl extends BaseServiceImpl<Integer, CourseSche 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new BizException("评论不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         courseScheduleReviewDao.update(courseScheduleReview); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(StringUtils.isNotBlank(courseScheduleReview.getHomeWork())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            CourseHomework homework = courseHomeworkDao.findByCourseSchedule(courseScheduleReview.getCourseScheduleId().longValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(!homework.getContent().equals(courseScheduleReview.getHomeWork())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                homework.setContent(courseScheduleReview.getHomeWork()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                courseHomeworkDao.update(homework); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return courseScheduleReview; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |