| | |
| | | wrapper.isNotNull("error"); |
| | | List<TStory> list1 = storyService.list(wrapper); |
| | | for (TStory tStory : list1) { |
| | | if (tStory.getError()!=null && (!tStory.getError().isEmpty())){ |
| | | if (tStory.getError() != null && (!tStory.getError().isEmpty())) { |
| | | tStories.add(tStory); |
| | | } |
| | | } |
| | |
| | | int sum = gameRecordList.stream().map(TGameRecord::getUseTime).mapToInt(Integer::intValue).sum(); |
| | | Integer totalStudy = studyRecord.getTotalStudy(); |
| | | studyRecord.setTotalStudy(Math.round((float) (totalStudy + sum) / 3600)); |
| | | studyRecord = studyService.studySchedule(studyRecord,week); |
| | | studyRecord = studyService.studySchedule(studyRecord, week); |
| | | } |
| | | return R.ok(studyRecord); |
| | | } |
| | |
| | | TUserStudy studyRecord = userStudyService.lambdaQuery().eq(TUserStudy::getUserId, userId) |
| | | .eq(TUserStudy::getDisabled, 0).one(); |
| | | // 总时长还需计算上游戏测试成绩时长 |
| | | List<TGameRecord> gameRecordList = gameRecordService.lambdaQuery().eq(TGameRecord::getUserId, userId) |
| | | .eq(TGameRecord::getDisabled, 0).list(); |
| | | List<TGameRecord> gameRecordList = gameRecordService.lambdaQuery() |
| | | .eq(TGameRecord::getUserId, userId) |
| | | .eq(TGameRecord::getDisabled, 0) |
| | | .orderByDesc(TGameRecord::getCreateTime) |
| | | .list(); |
| | | if (null != studyRecord) { |
| | | // 学习时长格式转换 |
| | | Integer todayStudy = studyRecord.getTodayStudy(); |
| | |
| | | studyRecord.setTotalStudy(Math.round((float) (totalStudy + sum) / 3600)); |
| | | return R.ok(new StudyRecordResultVO(studyRecord, gameRecordList)); |
| | | } |
| | | |
| | | @PostMapping("/recordManagement/{id}") |
| | | @ApiOperation(value = "游戏测试成绩", tags = {"管理后台-查看用户详情"}) |
| | | public R<StudyRecordResultVO> recordManagement(@PathVariable("id")Integer id) { |
| | | public R<StudyRecordResultVO> recordManagement(@PathVariable("id") Integer id) { |
| | | // 学习记录 |
| | | TUserStudy studyRecord = userStudyService.lambdaQuery().eq(TUserStudy::getUserId, id) |
| | | .eq(TUserStudy::getDisabled, 0).one(); |