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