try {
UserBase userBase = userBaseManager.findUniqueBy("username",
username);
BaseDTO result = new BaseDTO();
if (userBase == null) {
logger.error("user is not exists : [{}]", username);
result.setCode(404);
result.setMessage("user is not exists : [" + username + "]");
return result;
}
UserBaseWrapper userBaseWrapper = new UserBaseWrapper(userBase);
result.setCode(200);
result.setData(userBaseWrapper.toMap());
return result;
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
BaseDTO result = new BaseDTO();
result.setCode(500);
result.setMessage(ex.getMessage());
return result;
}
}