ruoyi-service/ruoyi-goods/src/main/java/com/ruoyi/goods/config/RedissonConfig.java
@@ -22,7 +22,10 @@ @Bean public RedissonClient redissonClient() { Config config = new Config(); config.useSingleServer().setAddress("redis://127.0.0.1:6379").setPassword("123456"); // 线上redis config.useSingleServer().setAddress("redis://127.0.0.1:6379").setPassword("dolphin123456"); // 本地redis // config.useSingleServer().setAddress("redis://127.0.0.1:6379").setPassword("123456"); return Redisson.create(config); } ruoyi-service/ruoyi-study/src/main/java/com/ruoyi/study/controller/TStudyController.java
@@ -828,7 +828,7 @@ .collect(Collectors.toList()); result = new SubjectRecordResultVO(teamIds, topicIds, subjectRecord.getAnswerNumber(), subjectRecord.getCorrectNumber()); } else { result = new SubjectRecordResultVO(); result = null; } subjectRecordService.lambdaUpdate().set(TSubjectRecord::getDisabled, 0) .eq(TSubjectRecord::getUserId, loginStudy.getUserid()).update(); @@ -1096,14 +1096,8 @@ record.setType(Constants.ZERO); update = update && studyRecordService.save(record); } // 学习配置列表 List<TStudy> studyList = studyService.lambdaQuery().eq(TStudy::getDisabled, 0) .orderByAsc(TStudy::getWeek).list(); if (studyList.isEmpty()) { throw new GlobalException("学习配置列表未配置或数据失效!"); } // 更改学习记录 Boolean updateStudyRecord = userStudyService.exchangeStudyRecord(studyList, userId, completeStudy); Boolean updateStudyRecord = userStudyService.exchangeStudyRecord(userId, completeStudy); return R.ok(update && updateStudyRecord); } @@ -1616,6 +1610,7 @@ integralRecord.setUpdateTime(new Date()); return R.ok(integralRecordService.save(integralRecord)); } @GetMapping("/addIntegralDetailParent") // @ApiOperation(value = "添加-积分明细", tags = {"添加-积分明细"}) @ApiImplicitParams({ @@ -1680,10 +1675,11 @@ } return R.ok(userService.updateById(user)); } @GetMapping("/exchangeIntegralParent") // @ApiOperation(value = "用户积分变动", tags = {"用户积分变动"}) public R<Boolean> exchangeIntegralParent(@RequestParam("integral") Integer integral, @RequestParam("method") String method) { if (tokenService.getLoginUser1()==null){ if (tokenService.getLoginUser1() == null) { return R.tokenError("登录失效"); } TUser user = userService.getById(tokenService.getLoginUser1().getUserid()); ruoyi-service/ruoyi-study/src/main/java/com/ruoyi/study/controller/TUserController.java
@@ -503,7 +503,10 @@ if (null == userStudy) { TUserStudy study = new TUserStudy(); study.setUserId(tUser1.getId()); study.setWeek(Constants.ONE); // 学习周目 TStudy tStudy = studyService.lambdaQuery().eq(TStudy::getQuarter, Constants.ONE) .orderByAsc(TStudy::getWeek).last("limit 1").one(); study.setWeek(tStudy.getWeek()); study.setDay(Constants.ONE); study.setTotalStudy(Constants.ZERO); study.setTodayStudy(Constants.ZERO); @@ -570,7 +573,10 @@ if (null == userStudy) { TUserStudy study = new TUserStudy(); study.setUserId(user.getId()); study.setWeek(Constants.ONE); // 学习周目 TStudy tStudy = studyService.lambdaQuery().eq(TStudy::getQuarter, Constants.ONE) .orderByAsc(TStudy::getWeek).last("limit 1").one(); study.setWeek(tStudy.getWeek()); study.setDay(Constants.ONE); study.setTotalStudy(Constants.ZERO); study.setTodayStudy(Constants.ZERO); @@ -722,7 +728,9 @@ Integer totalStudy = userStudy.getTotalStudy(); userStudy.setTotalStudy(Math.round((float) (totalStudy + sum) / 3600)); return R.ok(new UserPersonalCenterVO(user, userStudy)); }@GetMapping("/userInfoParent") } @GetMapping("/userInfoParent") @ApiOperation(value = "用户详情", tags = {"家长端-用户详情"}) public R<TUser> userInfoParent() { LoginUserParent loginUserStudy = tokenService.getLoginUser1(); ruoyi-service/ruoyi-study/src/main/java/com/ruoyi/study/service/ITUserStudyService.java
@@ -37,12 +37,11 @@ /** * 更改学习进度 * * @param studyList 学习配置列表 * @param userId 用户id * @param completeStudy 学习情况 * @return 更改结果 */ Boolean exchangeStudyRecord(List<TStudy> studyList, Integer userId, CompleteStudyDTO completeStudy); Boolean exchangeStudyRecord(Integer userId, CompleteStudyDTO completeStudy); /** * 超级记忆正确率达到通关率标准,才能进入下一周目学习 ruoyi-service/ruoyi-study/src/main/java/com/ruoyi/study/service/impl/TStudyServiceImpl.java
@@ -177,7 +177,6 @@ List<List<TSubject>> subjectList = new ArrayList<>(); for (TStudyListen studyListen : studyListens) { List<String> subjectIds = Arrays.stream(studyListen.getSubject().split(",")).collect(Collectors.toList()); Collections.shuffle(subjectIds); List<TSubject> list = new ArrayList<>(); // 图片及语音集合 for (String id : subjectIds) { @@ -211,7 +210,6 @@ List<List<TSubject>> subjectList = new ArrayList<>(); for (TStudyLook studyLook : lookList) { List<String> subjectIds = Arrays.stream(studyLook.getSubject().split(",")).collect(Collectors.toList()); Collections.shuffle(subjectIds); List<TSubject> list = new ArrayList<>(); // 图片及语音集合 for (String id : subjectIds) { @@ -245,7 +243,6 @@ List<List<TSubject>> subjectList = new ArrayList<>(); for (TStudyInduction data : inductionList) { List<String> subjectIds = Arrays.stream(data.getSubject().split(",")).collect(Collectors.toList()); Collections.shuffle(subjectIds); List<TSubject> subjectLists = new ArrayList<>(); for (String id : subjectIds) { if (id.startsWith("-")) { @@ -336,7 +333,6 @@ List<List<TSubject>> subjectList = new ArrayList<>(); for (TStudyPair data : pair) { List<String> subjectIds = Arrays.stream(data.getSubject().split(",")).collect(Collectors.toList()); Collections.shuffle(subjectIds); List<TSubject> subjectLists = new ArrayList<>(); for (String id : subjectIds) { if (id.startsWith("-")) { ruoyi-service/ruoyi-study/src/main/java/com/ruoyi/study/service/impl/TUserStudyServiceImpl.java
@@ -88,7 +88,7 @@ } @Override public Boolean exchangeStudyRecord(List<TStudy> studyList, Integer userId, CompleteStudyDTO completeStudy) { public Boolean exchangeStudyRecord(Integer userId, CompleteStudyDTO completeStudy) { Integer studyTime = completeStudy.getStudyTime(); // 学习记录 TUserStudy userStudyRecord = lambdaQuery().eq(TUserStudy::getUserId, userId)