Search in sources :

Example 1 with ProjectAccountRelationPO

use of com.ibeiliao.deployment.admin.po.project.ProjectAccountRelationPO in project Corgi by kevinYin.

the class ProjectModuleServiceImpl method getProjectModuleByAccountId.

@Override
public List<ProjectModule> getProjectModuleByAccountId(long accountId) {
    Assert.isTrue(accountId > 0);
    List<ProjectAccountRelationPO> relationPOS = projectAccountRelationDao.getByAccountId(accountId);
    if (CollectionUtils.isEmpty(relationPOS)) {
        return Collections.emptyList();
    }
    ArrayList<Integer> projectIds = Lists.newArrayList();
    for (ProjectAccountRelationPO relationPO : relationPOS) {
        projectIds.add(relationPO.getProjectId());
    }
    List<ProjectModulePO> modulePOS = projectModuleDao.getByProjectIds(projectIds);
    if (CollectionUtils.isEmpty(modulePOS)) {
        return Collections.emptyList();
    }
    return rebuildModuleName(projectIds, modulePOS);
}
Also used : ProjectModulePO(com.ibeiliao.deployment.admin.po.project.ProjectModulePO) ProjectAccountRelationPO(com.ibeiliao.deployment.admin.po.project.ProjectAccountRelationPO)

Aggregations

ProjectAccountRelationPO (com.ibeiliao.deployment.admin.po.project.ProjectAccountRelationPO)1 ProjectModulePO (com.ibeiliao.deployment.admin.po.project.ProjectModulePO)1