/**
* @see UserWebService#getAllUser()
*/
public GetAllUserResult getAllUser() {
GetAllUserResult result = new GetAllUserResult();
//获取User列表并转换为UserDTO列表.
try {
List<User> userEntityList = accountManager.getAllInitedUser();
List<UserDTO> userDTOList = Lists.newArrayList();
for (User userEntity : userEntityList) {
userDTOList.add(dozer.map(userEntity, UserDTO.class));
}
result.setUserList(userDTOList);
return result;
} catch (RuntimeException e) {
logger.error(e.getMessage(), e);
return result.buildDefaultErrorResult();
}
}