完善 SharePoint 自助获取 SiteId 的逻辑

This commit is contained in:
zhaojun1998
2021-02-03 21:03:28 +08:00
parent e30289d21b
commit 2b21d8a73c

View File

@@ -108,8 +108,17 @@ public class SharePointHelperController {
sharePointInfoVO.setDomainPrefix(domainPrefix);
}
if (StrUtil.isEmpty(sharePointInfoVO.getSiteType())) {
sharePointInfoVO.setSiteType("/sites/");
}
// 请求接口
String requestUrl = StrUtil.format("https://{}/v1.0/sites/{}.sharepoint.{}:/{}", host, sharePointInfoVO.getDomainPrefix(), sharePointInfoVO.getDomainType(), sharePointInfoVO.getSiteName());
String requestUrl = StrUtil.format("https://{}/v1.0/sites/{}.sharepoint.{}:/{}/{}", host,
sharePointInfoVO.getDomainPrefix(),
sharePointInfoVO.getDomainType(),
sharePointInfoVO.getSiteType(),
sharePointInfoVO.getSiteName());
HttpRequest getRequest = HttpUtil.createGet(requestUrl);
HttpResponse execute = getRequest.addHeaders(authorizationHeaders).execute();
String body = execute.body();