use of com.ibeiliao.deployment.admin.po.server.ServerPO in project Corgi by kevinYin.
the class ServerServiceImpl method getByModuleId.
@Override
public List<Server> getByModuleId(int moduleId) {
Assert.isTrue(moduleId > 0, "moduleId数值非法");
List<ServerGroup> serverGroups = serverGroupService.getByModuleIds(Lists.newArrayList(moduleId), false);
if (CollectionUtils.isEmpty(serverGroups)) {
return Collections.emptyList();
}
List<Integer> groupIds = Lists.newArrayList();
for (ServerGroup group : serverGroups) {
groupIds.add(group.getGroupId());
}
List<ServerPO> serverPOs = serverDao.getByGroupIds(groupIds);
if (CollectionUtils.isEmpty(serverPOs)) {
return Collections.emptyList();
}
return VOUtil.fromList(serverPOs, Server.class);
}
use of com.ibeiliao.deployment.admin.po.server.ServerPO in project Corgi by kevinYin.
the class ServerServiceImpl method getById.
@Override
public Server getById(int serverId) {
Assert.isTrue(serverId > 0, "服务器id 不大于0 !");
ServerPO serverPO = serverDao.get(serverId);
return VOUtil.from(serverPO, Server.class);
}
Aggregations