|
@@ -183,7 +183,7 @@ public class FeishuInfoServiceImpl extends ServiceImpl<FeishuInfoMapper, FeishuI
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
|
|
|
headers.setContentType(type);
|
|
|
- headers.add("Authorization","Bearer "+feishuInfo.getAccessToken());
|
|
|
+ headers.add("Authorization","Bearer "+getTenantAccessToken(feishuInfo.getAppId()));
|
|
|
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(null, headers);
|
|
|
Map<String,Object> map=new HashMap<>();
|
|
|
map.put("page_size",50);
|
|
@@ -269,7 +269,7 @@ public class FeishuInfoServiceImpl extends ServiceImpl<FeishuInfoMapper, FeishuI
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
|
|
|
headers.setContentType(type);
|
|
|
- headers.add("Authorization","Bearer "+feishuInfo.getAccessToken());
|
|
|
+ headers.add("Authorization","Bearer "+getTenantAccessToken(feishuInfo.getAppId()));
|
|
|
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(null, headers);
|
|
|
ResponseEntity<String> ResponseEntity = restTemplate.exchange(url,HttpMethod.GET,httpEntity,String.class);
|
|
|
if (ResponseEntity.getStatusCode() == HttpStatus.OK) {
|
|
@@ -295,7 +295,7 @@ public class FeishuInfoServiceImpl extends ServiceImpl<FeishuInfoMapper, FeishuI
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
|
|
|
headers.setContentType(type);
|
|
|
- headers.add("Authorization","Bearer "+feishuInfo.getAccessToken());
|
|
|
+ headers.add("Authorization","Bearer "+getTenantAccessToken(feishuInfo.getAppId()));
|
|
|
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(null, headers);
|
|
|
Map<String,Object> map=new HashMap<>();
|
|
|
map.put("page_size",50);
|
|
@@ -343,7 +343,7 @@ public class FeishuInfoServiceImpl extends ServiceImpl<FeishuInfoMapper, FeishuI
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
|
|
|
headers.setContentType(type);
|
|
|
- headers.add("Authorization","Bearer "+feishuInfo.getAccessToken());
|
|
|
+ headers.add("Authorization","Bearer "+getTenantAccessToken(feishuInfo.getAppId()));
|
|
|
JSONObject requestMap=new JSONObject();
|
|
|
JSONObject card=new JSONObject();
|
|
|
card.put("type","template");
|
|
@@ -409,7 +409,7 @@ public class FeishuInfoServiceImpl extends ServiceImpl<FeishuInfoMapper, FeishuI
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
|
|
|
headers.setContentType(type);
|
|
|
- headers.add("Authorization","Bearer "+feishuInfo.getAccessToken());
|
|
|
+ headers.add("Authorization","Bearer "+getTenantAccessToken(feishuInfo.getAppId()));
|
|
|
JSONObject requestMap=new JSONObject();
|
|
|
JSONObject card=new JSONObject();
|
|
|
JSONObject config=new JSONObject();
|