解决小组管理员无法看到应用中心相关应用的问题

This commit is contained in:
446052889@qq.com 2023-11-01 16:23:49 +08:00
parent d33aa94392
commit 2e57d2b17f
2 changed files with 23 additions and 0 deletions

View File

@ -1085,6 +1085,29 @@ public class CoeCooperationAPIManager {
List<String> appPerm = Arrays.stream(roleModel.getAppPerm().split(",")).collect(Collectors.toList()); List<String> appPerm = Arrays.stream(roleModel.getAppPerm().split(",")).collect(Collectors.toList());
set.addAll(appPerm); set.addAll(appPerm);
} }
// 若是全部权限将all替换成具体的应用id
if (set.contains("all")) {
// 获取所有的PAL小组扩展应用
// 调用App
String sourceAppId = CoEConstant.APP_ID;
// aslp服务地址
String aslp = "aslp://com.actionsoft.apps.coe.pal.cooperation/listApps";
// 参数定义列表
Map params = new HashMap<String, Object>();
AppAPI appAPI = SDK.getAppAPI();
//列出已注册的流程团队扩展App
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
if (ro.isOk()) {
JSONArray appArr = (JSONArray) ((Map) ro.getData()).get("apps");
Set<String> result = new HashSet<>();
for (int i = 0; i < appArr.size(); i++) {
set.add(appArr.getJSONObject(i).getString("id"));
}
} else {
SDK.getLogAPI().consoleWarn(ro.toString());
}
}
set.remove("all");
return set; return set;
} }