コード例 #1
0
  public List<SysApplication> getAccessAppList(long parentId, SysUser user) {
    long parentAppId = parentId;
    SysApplication parentApp = findById(parentId);
    if (parentApp != null) {
      parentAppId = parentApp.getNode().getId();
    }

    logger.debug("parent node:" + parentAppId);

    SysApplicationQuery query = new SysApplicationQuery();
    query.parentId(parentAppId);
    query.setLocked(0);
    List<Long> nodeIds = new java.util.ArrayList<Long>();
    nodeIds.add(-1L);

    List<SysApplication> apps = sysApplicationMapper.getSysApplicationByUserId(user.getId());
    if (apps != null && !apps.isEmpty()) {
      for (SysApplication app : apps) {
        nodeIds.add(app.getNodeId());
      }
    }
    query.nodeIds(nodeIds);

    return this.list(query);
  }
コード例 #2
0
  public List<SysApplication> getApplicationList(long parentId) {
    long parentAppId = parentId;
    SysApplication parentApp = findById(parentId);
    if (parentApp != null) {
      parentAppId = parentApp.getNode().getId();
    }

    logger.info("parent node:" + parentAppId);

    SysApplicationQuery query = new SysApplicationQuery();
    query.parentId(parentAppId);
    query.setLocked(0);

    List<SysApplication> apps = this.list(query);
    logger.debug("----------------apps size:" + apps.size());
    return apps;
  }