|
@@ -125,7 +125,16 @@ public class UserCloudServiceProvider extends ControllerSupport implements UserC
|
|
public GetUserResp getUser(@RequestBody GetUserReq req) {
|
|
public GetUserResp getUser(@RequestBody GetUserReq req) {
|
|
Long rootOrgId = req.getRootOrgId();
|
|
Long rootOrgId = req.getRootOrgId();
|
|
String loginName = req.getLoginName();
|
|
String loginName = req.getLoginName();
|
|
- UserEntity userEntity = userRepo.findByRootOrgIdAndLoginName(rootOrgId, loginName);
|
|
|
|
|
|
+ Long userId = req.getUserId();
|
|
|
|
+
|
|
|
|
+ UserEntity userEntity = null;
|
|
|
|
+ if (null != userId) {
|
|
|
|
+ userEntity = userRepo.findOne(userId);
|
|
|
|
+ } else if (StringUtils.isNotBlank(loginName)) {
|
|
|
|
+ userEntity = userRepo.findByRootOrgIdAndLoginName(rootOrgId, loginName);
|
|
|
|
+ } else {
|
|
|
|
+ throw new StatusException("B-230001", "userId and loginName can not be all null");
|
|
|
|
+ }
|
|
|
|
|
|
GetUserResp resp = new GetUserResp();
|
|
GetUserResp resp = new GetUserResp();
|
|
if (null == userEntity) {
|
|
if (null == userEntity) {
|