change 4 лет назад
Родитель
Сommit
da981f0019

+ 4 - 4
zhongzheng-api/src/main/java/com/zhongzheng/controller/activity/ActivityTaskController.java

@@ -70,14 +70,14 @@ public class ActivityTaskController extends BaseController {
     /**
     /**
      * 完善信息
      * 完善信息
      */
      */
-    @ApiOperation("完善信息")
+  /*  @ApiOperation("完善信息")
     @Log(title = "完善信息", businessType = BusinessType.UPDATE)
     @Log(title = "完善信息", businessType = BusinessType.UPDATE)
     @PostMapping("/information")
     @PostMapping("/information")
     public AjaxResult<Void> information(@RequestBody ActivityTaskUserAddBo bo) throws IllegalAccessException {
     public AjaxResult<Void> information(@RequestBody ActivityTaskUserAddBo bo) throws IllegalAccessException {
         ClientLoginUser loginUser = WxTokenService.getLoginUser(ServletUtils.getRequest());
         ClientLoginUser loginUser = WxTokenService.getLoginUser(ServletUtils.getRequest());
         bo.setUserId(loginUser.getUser().getUserId());
         bo.setUserId(loginUser.getUser().getUserId());
         return toAjax(activityTaskUserService.information(bo) ? 1 : 0);
         return toAjax(activityTaskUserService.information(bo) ? 1 : 0);
-    }
+    }*/
 
 
 
 
 
 
@@ -120,13 +120,13 @@ public class ActivityTaskController extends BaseController {
     /**
     /**
      * 模拟考试
      * 模拟考试
      */
      */
-    @ApiOperation("模拟考试")
+ /*   @ApiOperation("模拟考试")
     @Log(title = "模拟考试", businessType = BusinessType.UPDATE)
     @Log(title = "模拟考试", businessType = BusinessType.UPDATE)
     @PostMapping("/practiceTest")
     @PostMapping("/practiceTest")
     public AjaxResult<Void> practiceTest(@RequestBody ActivityTaskUserAddBo bo){
     public AjaxResult<Void> practiceTest(@RequestBody ActivityTaskUserAddBo bo){
         ClientLoginUser loginUser = WxTokenService.getLoginUser(ServletUtils.getRequest());
         ClientLoginUser loginUser = WxTokenService.getLoginUser(ServletUtils.getRequest());
         bo.setUserId(loginUser.getUser().getUserId());
         bo.setUserId(loginUser.getUser().getUserId());
         return toAjax(activityTaskUserService.practiceTest(bo) ? 1 : 0);
         return toAjax(activityTaskUserService.practiceTest(bo) ? 1 : 0);
-    }
+    }*/
 
 
 }
 }

+ 10 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserPlanServiceImpl.java

@@ -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);