| | |
| | | @Value("${feishu.appSecret:}") |
| | | private String appSecret; |
| | | |
| | | @Value("${feishu.url:}") |
| | | private String feishuUrl; |
| | | |
| | | /** |
| | | * 同步飞书部门用户到系统用户表 |
| | | * @param departmentId 飞书部门ID |
| | |
| | | |
| | | private String getFeishuAccessToken() { |
| | | try { |
| | | String url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"; |
| | | String url = feishuUrl + "open-apis/auth/v3/tenant_access_token/internal"; |
| | | |
| | | log.info("开始获取飞书访问令牌,AppId: {}", |
| | | appId != null ? appId.substring(0, Math.min(appId.length(), 10)) + "..." : "null"); |
| | |
| | | log.info("使用的访问令牌前缀: Bearer {}", accessToken.substring(0, Math.min(20, accessToken.length())) + "..."); |
| | | |
| | | // 飞书API端点 |
| | | String url = "https://open.feishu.cn/open-apis/contact/v3/users/find_by_department"; |
| | | String url = feishuUrl + "open-apis/contact/v3/users/find_by_department"; |
| | | |
| | | String pageToken = null; |
| | | int pageNumber = 1; |
| | |
| | | poolSize: 5 # 线程池数量 |
| | | expirationTime: 10000 # 过期时间 |
| | | peekLimit: 10 # 峰值 |
| | | feishu: |
| | | url: https://open.feishu.cn/ |
| | | appId: cli_a74aab6353b7d00e |
| | | appSecret: mx5wm7X9S8WSzZCOYlxcggXTFL8iujIT |
| | | sync: |
| | | departmentId: od-47692f32e6b66cc3985d317fee780a8b |
| | |
| | | lang: ZH # 语言 |
| | | poolSize: 5 # 线程池数量 |
| | | expirationTime: 10000 # 过期时间 |
| | | peekLimit: 10 # 峰值 |
| | | peekLimit: 10 # 峰值 |
| | | feishu: |
| | | url: https://open.feishu.cn/ |
| | | appId: cli_a74aab6353b7d00e |
| | | appSecret: mx5wm7X9S8WSzZCOYlxcggXTFL8iujIT |
| | | sync: |
| | | departmentId: od-47692f32e6b66cc3985d317fee780a8b |