查询用户授权app
parent
c1f55e4c99
commit
ddd530f969
|
@ -114,16 +114,18 @@ public class IndexServiceImpl implements IndexService {
|
|||
param.put("page", 1);
|
||||
param.put("limit", Integer.MAX_VALUE);
|
||||
String result = ykUtil.call(YkInfo.getAllAppList, param, JSONArray.class);
|
||||
List<JSONObject> list = JSONObject.parseObject(result, List.class);
|
||||
JSONObject allAppJson = JSONObject.parseObject(result, JSONObject.class);
|
||||
List<JSONObject> allAppList = JSONObject.parseObject(allAppJson.getString("list"), List.class);
|
||||
|
||||
|
||||
List<JSONObject> userAppList = getUserAppList(requestContext);
|
||||
List<String> appIdList = userAppList.stream().map(jsonObject -> jsonObject.getString("appId")).collect(Collectors.toList());
|
||||
for (JSONObject data : list) {
|
||||
for (JSONObject data : allAppList) {
|
||||
if(appIdList.contains(data.getString("appId"))){
|
||||
data.put("enable", "1");
|
||||
}
|
||||
}
|
||||
return new GeneralResult(true, userAppList, "查询成功");
|
||||
return new GeneralResult(true, allAppList, "查询成功");
|
||||
} catch (Exception e) {
|
||||
log.info("查询失败", e);
|
||||
return new GeneralResult(false, "查询失败");
|
||||
|
|
Loading…
Reference in New Issue