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);
@@ -724,6 +730,17 @@
        return R.ok(new UserPersonalCenterVO(user, userStudy));
    }
    @GetMapping("/userInfoParent")
    @ApiOperation(value = "用户详情", tags = {"家长端-用户详情"})
    public R<TUser> userInfoParent() {
        LoginUserParent loginUserStudy = tokenService.getLoginUser1();
        if (null == loginUserStudy) {
            return R.tokenError("登录失效!");
        }
        TUser byId = userService.getById(loginUserStudy.getUserid());
        return R.ok(byId);
    }
    @PostMapping("/deleteUser")
    @ApiOperation(value = "注销当前帐号", tags = {"家长端-个人中心"})
    @ApiImplicitParams({