API获取用户信息时,过滤掉被删除的用户
This commit is contained in:
@@ -49,7 +49,7 @@ public class GetUserAction extends AdminAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RestResult result;
|
RestResult result;
|
||||||
if (user == null) {
|
if (user == null || user.getDeleted() > 0) {
|
||||||
result = RestResult.resultOf(ErrorCode.ERROR_CODE_NOT_EXIST);
|
result = RestResult.resultOf(ErrorCode.ERROR_CODE_NOT_EXIST);
|
||||||
} else {
|
} else {
|
||||||
result = RestResult.ok(InputOutputUserInfo.fromPbUser(user));
|
result = RestResult.ok(InputOutputUserInfo.fromPbUser(user));
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class GetUserAction extends ChannelAction {
|
|||||||
|
|
||||||
RestResult result;
|
RestResult result;
|
||||||
|
|
||||||
if (user == null || StringUtil.isNullOrEmpty(user.getName())) {
|
if (user == null || StringUtil.isNullOrEmpty(user.getName()) || user.getDeleted() > 0) {
|
||||||
result = RestResult.resultOf(ErrorCode.ERROR_CODE_NOT_EXIST);
|
result = RestResult.resultOf(ErrorCode.ERROR_CODE_NOT_EXIST);
|
||||||
} else {
|
} else {
|
||||||
if (channelInfo.getOwner().equals(inputUserId.getUserId()) ||
|
if (channelInfo.getOwner().equals(inputUserId.getUserId()) ||
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class GetUserAction extends RobotAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RestResult result;
|
RestResult result;
|
||||||
if (user == null) {
|
if (user == null || user.getDeleted() > 0) {
|
||||||
result = RestResult.resultOf(ErrorCode.ERROR_CODE_NOT_EXIST);
|
result = RestResult.resultOf(ErrorCode.ERROR_CODE_NOT_EXIST);
|
||||||
} else {
|
} else {
|
||||||
result = RestResult.ok(InputOutputUserInfo.fromPbUser(user));
|
result = RestResult.ok(InputOutputUserInfo.fromPbUser(user));
|
||||||
|
|||||||
Reference in New Issue
Block a user