12345678910111213141516171819202122232425262728 |
- package com.webchat.client.chat.controller;
- import com.webchat.client.chat.service.UserService;
- import com.webchat.common.bean.APIResponseBean;
- import com.webchat.common.bean.APIResponseBeanUtil;
- import com.webchat.common.helper.SessionHelper;
- import com.webchat.domain.vo.response.UserBaseResponseInfoVO;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- @RestController
- @RequestMapping("/client-service/chat/user")
- public class UserController {
- @Autowired
- private UserService userService;
- @GetMapping("/current/info")
- public APIResponseBean<UserBaseResponseInfoVO> getCurrentUserInfo() {
- String userId = SessionHelper.getCurrentUserId();
- return APIResponseBeanUtil.success(userService.userInfo(userId));
- }
- }
|