hjl
2024-05-24 3e9e81913bd8bde5b2ccde2c95acc7c5d94b32ba
ruoyi-service/ruoyi-study/src/main/java/com/ruoyi/study/controller/TUserController.java
@@ -467,6 +467,28 @@
        return R.ok(map);
    }
    /**
     * 学生端退出登录
     * @param request 请求信息
     */
    @PostMapping("/logoutStudy")
    @ApiOperation(value = "退出登录", tags = {"学习端-个人中心"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header"),
    })
    public R<String> logoutStudy(HttpServletRequest request) {
        if (tokenService.getLoginUserStudy() == null) {
            throw new GlobalException("登录失效!");
        }
        String token = SecurityUtils.getToken(request);
        if (null != token) {
            // 删除用户缓存记录
            AuthUtil.logoutByTokenStudy(token);
        }
        // todo 清除token
        return R.ok("退出登录成功!");
    }
    private TUser getUser(String phone) {
        TUser user = new TUser();
        // 注册
@@ -737,12 +759,14 @@
        res.setTotal(list.size());
        return R.ok(res);
    }
    @Resource
    private ITUserStudyService userStudyService;
    @Resource
    private ITGameRecordService gameRecordService;
    @Autowired
    private ITStudyService studyService;
    @PostMapping("/getUserInfo")
    @ApiOperation(value = "查看用户详情", tags = {"管理后台-用户管理"})
    public R<UserInfoVO> getUserInfo(@RequestBody UserInfoQuery dto) {