|
@@ -58,6 +58,10 @@ public class DingUtil {
|
|
|
|
|
|
SuiteTicketInfo suiteTicketInfo = suiteTicketInfoService.getOne(q -> q.eq(SuiteTicketInfo::getCorpId, corpId));
|
|
|
|
|
|
+ if (suiteTicketInfo == null){
|
|
|
+ throw new ServiceException("没有找到对应的corp_id");
|
|
|
+ }
|
|
|
+
|
|
|
GetCorpAccessTokenRequest getCorpAccessTokenRequest = new GetCorpAccessTokenRequest()
|
|
|
.setSuiteKey(Constant.SUITE_KEY)
|
|
|
.setSuiteSecret(Constant.SUITE_SECRET)
|
|
@@ -124,6 +128,10 @@ public class DingUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ List<OapiV2DepartmentListsubResponse.DeptBaseResponse> deptList = getDeptList("", 1L);
|
|
|
+ System.out.println(deptList);
|
|
|
+ }
|
|
|
|
|
|
private static com.aliyun.dingtalkcontact_1_0.Client getClient1() throws Exception {
|
|
|
Config config = new Config();
|