| 
					
				 | 
			
			
				@@ -580,6 +580,12 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 .orElseThrow(() -> new BizException("用户不存在")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private SysUser getSysUser(Long userId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return Optional.ofNullable(userId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .map(sysUserFeignService::queryUserById) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .orElseThrow(() -> new BizException("用户不存在")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 老师端-首页-我的课程-陪练课 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * search:{"classMonth":"2022-03","status":"COMPLETE","subjectId":1} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -804,7 +810,9 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         log.info("学生购买陪练课,请求参数:{}", JSON.toJSONString(orderReqInfo)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Long studentId = orderReqInfo.getUserId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        PracticeScheduleDto scheduleDto= (PracticeScheduleDto) orderReqInfo.getBizContent(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //校验学生信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        getSysUser(studentId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ObjectMapper objectMapper = new ObjectMapper(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         PracticeScheduleDto scheduleDto = objectMapper.convertValue(orderReqInfo.getBizContent(), PracticeScheduleDto.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -814,7 +822,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         scheduleDto.setMixStudentNum(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         scheduleDto.setStudentId(studentId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //course_group 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //写入course_group 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         baseMapper.addCourseGroup(scheduleDto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Long groupId = scheduleDto.getGroupId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -833,7 +841,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             schedule.setLock(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             schedule.setStatus(CourseScheduleEnum.NOT_START.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             schedule.setCreatedBy(scheduleDto.getStudentId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            //course_schedule 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //写入course_schedule 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             baseMapper.insert(schedule); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Long scheduleId = schedule.getId(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -846,7 +854,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             payment.setOriginalPrice(unitPrice); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             payment.setExpectPrice(unitPrice); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             payment.setActualPrice(unitPrice); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            //course_schedule_student_payment 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //写入course_schedule_student_payment 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             courseScheduleStudentPaymentService.save(payment); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -906,5 +914,15 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //修改订单为失败 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @Description: 老师端-课表-日历-调课 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @Author: cy 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @Date: 2022/4/21 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void courseAdjust(CourseAdjustVo adjustVo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        baseMapper.courseAdjust(adjustVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |