|
@@ -12,6 +12,7 @@ import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamArrangementTimeVo;
|
|
import com.zhongzheng.modules.exam.vo.ExamArrangementTimeVo;
|
|
|
import com.zhongzheng.modules.user.domain.UserPlanCource;
|
|
import com.zhongzheng.modules.user.domain.UserPlanCource;
|
|
|
import com.zhongzheng.modules.user.service.IUserPlanCourceService;
|
|
import com.zhongzheng.modules.user.service.IUserPlanCourceService;
|
|
|
|
|
+import com.zhongzheng.modules.user.service.IUserStudyRecordService;
|
|
|
import com.zhongzheng.modules.user.vo.CalendarStudyVo;
|
|
import com.zhongzheng.modules.user.vo.CalendarStudyVo;
|
|
|
import com.zhongzheng.modules.user.vo.CoursePlanVo;
|
|
import com.zhongzheng.modules.user.vo.CoursePlanVo;
|
|
|
import com.zhongzheng.modules.user.vo.DayStudyVo;
|
|
import com.zhongzheng.modules.user.vo.DayStudyVo;
|
|
@@ -50,6 +51,9 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IUserPlanCourceService userPlanCourceService;
|
|
private IUserPlanCourceService userPlanCourceService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IUserStudyRecordService userStudyRecordService;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public UserPlanVo queryById(Long userId){
|
|
public UserPlanVo queryById(Long userId){
|
|
|
UserPlan db = this.baseMapper.selectById(userId);
|
|
UserPlan db = this.baseMapper.selectById(userId);
|
|
@@ -253,8 +257,9 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
bo.setCourseId(array);
|
|
bo.setCourseId(array);
|
|
|
List<CoursePlanVo> coursePlanVo = baseMapper.selectByListCourse(bo);
|
|
List<CoursePlanVo> coursePlanVo = baseMapper.selectByListCourse(bo);
|
|
|
|
|
|
|
|
- //获得当天的学习课程节数
|
|
|
|
|
|
|
+
|
|
|
coursePlanVo.stream().forEach(s -> {
|
|
coursePlanVo.stream().forEach(s -> {
|
|
|
|
|
+ //获得当天学习课程节数
|
|
|
calendarStudyVos.stream().filter(c -> c.getMonth()==cal.get(Calendar.MONTH) + 1).forEach(c -> {
|
|
calendarStudyVos.stream().filter(c -> c.getMonth()==cal.get(Calendar.MONTH) + 1).forEach(c -> {
|
|
|
c.getDayStudyList().stream()
|
|
c.getDayStudyList().stream()
|
|
|
.filter(g -> g.getDate() == cal.get(Calendar.DAY_OF_MONTH))
|
|
.filter(g -> g.getDate() == cal.get(Calendar.DAY_OF_MONTH))
|
|
@@ -266,6 +271,10 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ //更新当天学习节数是否已经完成
|
|
|
|
|
+
|
|
|
|
|
+ //int studyCount = userStudyRecordService.selectUserStudy(bo.getUserId(),s.getCourseId(),startTime,endTime);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
userPlanVo.setCoursePlanVo(coursePlanVo);
|
|
userPlanVo.setCoursePlanVo(coursePlanVo);
|