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