use of com.orion.ops.entity.vo.MachineInfoVO in project orion-ops by lijiahangmax.
the class MachineInfoServiceImpl method machineDetail.
@Override
public MachineInfoVO machineDetail(Long id) {
MachineInfoDO machine = machineInfoDAO.selectById(id);
Valid.notNull(machine, MessageConst.INVALID_MACHINE);
MachineInfoVO vo = Converts.to(machine, MachineInfoVO.class);
Optional.ofNullable(machine.getProxyId()).map(machineProxyDAO::selectById).ifPresent(p -> {
vo.setProxyHost(p.getProxyHost());
vo.setProxyPort(p.getProxyPort());
vo.setProxyType(p.getProxyType());
});
return vo;
}
Aggregations