|
|
@@ -74,7 +74,7 @@ public class OAService {
|
|
|
|
|
|
public String getTelNumber(String username) throws Exception{
|
|
|
String token = getGetToken();
|
|
|
- String getLoginNameUrl = host + oaUserInfoPath + token;
|
|
|
+ String getLoginNameUrl = host + oaUserInfoPath + username;
|
|
|
Map<String, String> header = new HashMap<>();
|
|
|
header.put("token", token);
|
|
|
|
|
|
@@ -173,4 +173,26 @@ public class OAService {
|
|
|
log.info(uuid + "推送OA消息res========>" + resObj.toJSONString());
|
|
|
return resObj.getBoolean("success");
|
|
|
}
|
|
|
+
|
|
|
+// public static void main(String[] args) throws Exception {
|
|
|
+// String url = "http://172.16.1.71:8080" + "/seeyon/rest/token";
|
|
|
+// JSONObject object = new JSONObject();
|
|
|
+// object.put("userName", "zcxt");
|
|
|
+// object.put("password", "f87f6334-585d-42dd-95bc-7e7b97c7cfe8");
|
|
|
+//
|
|
|
+// String uuid = UUID.randomUUID().toString();
|
|
|
+// log.info(uuid + "查询OAtoken的req========>" + object.toJSONString() + ",url========>" + url);
|
|
|
+// JSONObject resObject = HttpClientUtil.sendPOST(url, object.toJSONString());
|
|
|
+// log.info(uuid + "查询OAtoken的res========>" + resObject.toJSONString());
|
|
|
+// String token = resObject.getString("id");
|
|
|
+// String getLoginNameUrl = "http://172.16.1.71:8080" + "/seeyon/rest/orgMember?loginName=" + "huangjx";
|
|
|
+// Map<String, String> header = new HashMap<>();
|
|
|
+// header.put("token", token);
|
|
|
+//
|
|
|
+// uuid = UUID.randomUUID().toString();
|
|
|
+// log.info(uuid + "查询OA telNumber的url========>" + getLoginNameUrl);
|
|
|
+// JSONObject resObj = HttpClientUtil.sendGETWithHeader_Obj(getLoginNameUrl, header);
|
|
|
+// log.info(uuid + "查询OA telNumber的username======>" + "" + ",res======>" + resObj.toJSONString());
|
|
|
+// System.out.println(resObj.getString("telNumber"));
|
|
|
+// }
|
|
|
}
|