hjl
2024-06-19 68aa7c66071339064dfd300a8e3d7540db09075d
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();