Compare commits

..

No commits in common. "152856d8f92d07d510865c58c2cd19eda91b7b7b" and "dccfc451bdd72f770b428ba1995688cd43a1d322" have entirely different histories.

1 changed files with 2 additions and 10 deletions

View File

@ -38,7 +38,6 @@ public class IndexServiceImpl implements IndexService {
try {
JSONObject param = new JSONObject();
User user = userRepository.query(requestContext.getTarget());
log.info("user:{}", JSON.toJSONString(user));
param.put("userId", user.getUserId());
param.put("page", pager.getPage());
param.put("limit", pager.getRows());
@ -85,7 +84,6 @@ public class IndexServiceImpl implements IndexService {
private JSONObject getTaskList(RequestContext requestContext) throws Exception {
JSONObject param = new JSONObject();
User user = userRepository.query(requestContext.getTarget());
log.info("user:{}", JSON.toJSONString(user));
param.put("userId", user.getUserId());
param.put("page", 1);
param.put("limit", Integer.MAX_VALUE);
@ -100,7 +98,6 @@ public class IndexServiceImpl implements IndexService {
//获取用户数据权限申请数量
JSONObject userParam = new JSONObject();
User user = userRepository.query(requestContext.getTarget());
log.info("user:{}", JSON.toJSONString(user));
userParam.put("userId", user.getUserId());
String data = ykUtil.call(YkInfo.getCountTaskByUser, userParam, JSONArray.class);
List<JSONObject> list = JSONObject.parseObject(data, List.class);
@ -126,19 +123,17 @@ public class IndexServiceImpl implements IndexService {
String result = ykUtil.call(YkInfo.getAllAppList, param, JSONArray.class);
JSONObject allAppJson = JSONObject.parseObject(result, JSONObject.class);
List<JSONObject> allAppList = JSONObject.parseObject(allAppJson.getString("list"), List.class);
log.info("allAppList:{}", JSON.toJSONString(allAppList));
List<JSONObject> userAppList = getUserAppList(requestContext);
log.info("userAppList:{}", JSON.toJSONString(userAppList));
List<String> appIdList = userAppList.stream().map(jsonObject -> jsonObject.getString("appId")).collect(Collectors.toList());
log.info("appIdList:{}", JSON.toJSONString(appIdList));
for (JSONObject data : allAppList) {
if (appIdList.contains(data.getString("appId"))) {
data.put("enable", "1");
} else {
data.put("enable", "0");
}
}
log.info("allAppList:{}", JSON.toJSONString(allAppList));
return new GeneralResult(true, allAppList, "查询成功");
} catch (Exception e) {
log.info("查询失败", e);
@ -203,12 +198,9 @@ public class IndexServiceImpl implements IndexService {
//查询当前用户授权应用
JSONObject param = new JSONObject();
User user = userRepository.query(requestContext.getTarget());
log.info("user:{}", JSON.toJSONString(user));
param.put("userId", user.getUserId());
param.put("type", "user");
log.info("get user app list params:{}", JSON.toJSONString(param));
String result = ykUtil.call(YkInfo.getUserAppList, param, JSONArray.class);
log.info("get user app list result:" + result);
return JSONObject.parseObject(result, List.class);
}
}