get user
This commit is contained in:
parent
6cb11c5fb7
commit
26079198e1
|
@ -10,9 +10,9 @@ import io.metersphere.commons.utils.PageUtils;
|
||||||
import io.metersphere.commons.utils.Pager;
|
import io.metersphere.commons.utils.Pager;
|
||||||
import io.metersphere.commons.utils.SessionUtils;
|
import io.metersphere.commons.utils.SessionUtils;
|
||||||
import io.metersphere.controller.request.member.AddMemberRequest;
|
import io.metersphere.controller.request.member.AddMemberRequest;
|
||||||
import io.metersphere.controller.request.member.UserRequest;
|
|
||||||
import io.metersphere.controller.request.member.EditPassWordRequest;
|
import io.metersphere.controller.request.member.EditPassWordRequest;
|
||||||
import io.metersphere.controller.request.member.QueryMemberRequest;
|
import io.metersphere.controller.request.member.QueryMemberRequest;
|
||||||
|
import io.metersphere.controller.request.member.UserRequest;
|
||||||
import io.metersphere.controller.request.organization.AddOrgMemberRequest;
|
import io.metersphere.controller.request.organization.AddOrgMemberRequest;
|
||||||
import io.metersphere.controller.request.organization.QueryOrgMemberRequest;
|
import io.metersphere.controller.request.organization.QueryOrgMemberRequest;
|
||||||
import io.metersphere.dto.UserDTO;
|
import io.metersphere.dto.UserDTO;
|
||||||
|
@ -25,6 +25,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.Logical;
|
import org.apache.shiro.authz.annotation.Logical;
|
||||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -161,7 +162,7 @@ public class UserController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/info/{userId}")
|
@GetMapping("/info/{userId}")
|
||||||
public User getUserInfo(@PathVariable(value = "userId") String userId) {
|
public UserDTO getUserInfo(@PathVariable(value = "userId") String userId) {
|
||||||
return userService.getUserInfo(userId);
|
return userService.getUserInfo(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@ import io.metersphere.commons.user.SessionUser;
|
||||||
import io.metersphere.commons.utils.CodingUtil;
|
import io.metersphere.commons.utils.CodingUtil;
|
||||||
import io.metersphere.commons.utils.SessionUtils;
|
import io.metersphere.commons.utils.SessionUtils;
|
||||||
import io.metersphere.controller.request.member.AddMemberRequest;
|
import io.metersphere.controller.request.member.AddMemberRequest;
|
||||||
import io.metersphere.controller.request.member.UserRequest;
|
|
||||||
import io.metersphere.controller.request.member.EditPassWordRequest;
|
import io.metersphere.controller.request.member.EditPassWordRequest;
|
||||||
import io.metersphere.controller.request.member.QueryMemberRequest;
|
import io.metersphere.controller.request.member.QueryMemberRequest;
|
||||||
|
import io.metersphere.controller.request.member.UserRequest;
|
||||||
import io.metersphere.controller.request.organization.AddOrgMemberRequest;
|
import io.metersphere.controller.request.organization.AddOrgMemberRequest;
|
||||||
import io.metersphere.controller.request.organization.QueryOrgMemberRequest;
|
import io.metersphere.controller.request.organization.QueryOrgMemberRequest;
|
||||||
import io.metersphere.dto.UserDTO;
|
import io.metersphere.dto.UserDTO;
|
||||||
|
@ -25,6 +25,7 @@ import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -252,8 +253,8 @@ public class UserService {
|
||||||
userMapper.updateByPrimaryKeySelective(newUser);
|
userMapper.updateByPrimaryKeySelective(newUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
public User getUserInfo(String userId) {
|
public UserDTO getUserInfo(String userId) {
|
||||||
return userMapper.selectByPrimaryKey(userId);
|
return getUserDTO(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<User> getMemberList(QueryMemberRequest request) {
|
public List<User> getMemberList(QueryMemberRequest request) {
|
||||||
|
|
Loading…
Reference in New Issue