| | |
| | | studyRecord.setMonthStudy(Math.round((float) monthStudy / 3600)); |
| | | // 总时长还需计算上游戏测试成绩时长 |
| | | List<TGameRecord> gameRecordList = gameRecordService.lambdaQuery().eq(TGameRecord::getUserId, dto.getId()) |
| | | .eq(TGameRecord::getDisabled, 0).list(); |
| | | .eq(TGameRecord::getDisabled, 0) |
| | | .orderByDesc(TGameRecord::getCreateTime) |
| | | .list(); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd HH:mm"); |
| | | for (TGameRecord tGameRecord : gameRecordList) { |
| | | tGameRecord.setTime(simpleDateFormat.format(tGameRecord.getCreateTime())); |
| | | } |
| | | int sum = gameRecordList.stream().map(TGameRecord::getUseTime).mapToInt(Integer::intValue).sum(); |
| | | Integer totalStudy = studyRecord.getTotalStudy(); |
| | | studyRecord.setTotalStudy(Math.round((float) (totalStudy + sum) / 3600)); |
| | | studyRecord.setTotalStudy(Math.round((float) (totalStudy) / 3600)); |
| | | res.setCurrent(studyRecord.getWeek()+""); |
| | | // 剩余周目 |
| | | List<TStudy> studyList = studyService.lambdaQuery().eq(TStudy::getDisabled, 0) |