为什么不能成功获取部门的信息,返回的都是空值
Re为什么不能成功获取部门的信息,返回的都是空值
public static JSONArray getDepartment(String accessToken,String department_id,String offset,String limit){
String recordUrl = 'https://oapi.dingtalk.com/user/simplelist?access_token='+accessToken+'id='+department_id;
JSONObject jsonObject = new JSONObject();
jsonObject.put('id', department_id);
jsonObject.put('offset',offset);
jsonObject.put('limit',limit);
String result = test.doPost(recordUrl,jsonObject,'utf-8');
JSONObject resutJSON = jsonObject.parseObject(result);
String msg = (String)resutJSON.get('errmsg');
JSONArray jsonArray = null;
if('ok'.equals(msg)){
jsonArray = (JSONArray) resutJSON.get('recordresult');
}
return jsonArray;[code][/code]
赞0
踩0