| | |
| | | // 学习记录 |
| | | TUserStudy userStudyRecord = lambdaQuery().eq(TUserStudy::getUserId, userId) |
| | | .eq(TUserStudy::getDisabled, 0).one(); |
| | | Integer week = userStudyRecord.getWeek(); |
| | | Integer day = userStudyRecord.getDay(); |
| | | if (week.equals(completeStudy.getWeek()) && day.equals(completeStudy.getDay())) { |
| | | Integer type = completeStudy.getType(); |
| | | if (Constants.ONE.equals(type)) { |
| | | userStudyRecord.setListen(Constants.ONE_HUNDRED); |
| | |
| | | userStudyRecord.setPair(Constants.BURDEN_ONE); |
| | | } else if (Constants.FOUR.equals(type)) { |
| | | userStudyRecord.setAnswer(Constants.ONE_HUNDRED); |
| | | userStudyRecord.setPair(Constants.BURDEN_ONE); |
| | | } else if (Constants.FIVE.equals(type)) { |
| | | userStudyRecord.setPair(Constants.ONE_HUNDRED); |
| | | // type为5并且day为5应该进入游戏日 |
| | |
| | | userStudyRecord.setDay(nextDay); |
| | | // 游戏难度初始化 0(入门难度) |
| | | userStudyRecord.setGameDifficulty(Constants.ZERO); |
| | | // 学习day已切换更新学习进度及学习时长 |
| | | // userStudyRecord.setListen(Constants.BURDEN_ONE); |
| | | // userStudyRecord.setLook(Constants.BURDEN_ONE); |
| | | // userStudyRecord.setInduction(Constants.BURDEN_ONE); |
| | | // userStudyRecord.setAnswer(Constants.BURDEN_ONE); |
| | | // userStudyRecord.setPair(Constants.BURDEN_ONE); |
| | | // 下一day为 1说明该周目已完成,应更改为下一周目 |
| | | } |
| | | } |
| | | // 更新学习时长 |
| | | userStudyRecord.setTotalStudy(userStudyRecord.getTotalStudy() + studyTime); |