添加日志
parent
2dc6d70f83
commit
9ac20d6905
|
@ -38,6 +38,7 @@ 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());
|
||||||
|
@ -84,6 +85,7 @@ 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);
|
||||||
|
@ -98,6 +100,7 @@ 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);
|
||||||
|
@ -123,17 +126,19 @@ 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);
|
||||||
|
@ -198,9 +203,12 @@ 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