feat: 飞书机器人按租户路由 群组绑定租户 + 独立凭证 + 知识库隔离
1. 新增 resolve_tenant_by_chat_id() 根据飞书群 chat_id 查找绑定的租户 2. 新增 get_tenant_feishu_config() 获取租户级飞书凭证 3. FeishuService 支持传入自定义 app_id/app_secret(租户级别) 4. feishu_bot.py 收到消息时自动解析租户,使用租户凭证回复 5. feishu_longconn_service.py 同样按 chat_id 解析租户并传递 tenant_id 6. 租户管理 UI 新增飞书配置字段:App ID、App Secret、绑定群 Chat ID 7. 租户列表展示飞书绑定状态和群数量 8. 保存租户时同步更新飞书配置到 config JSON
This commit is contained in:
@@ -2259,6 +2259,21 @@
|
||||
<label class="form-label">描述</label>
|
||||
<textarea class="form-control" id="tenant-desc-input" rows="2" placeholder="可选"></textarea>
|
||||
</div>
|
||||
<hr>
|
||||
<h6 class="text-muted">飞书配置(可选)</h6>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">飞书 App ID</label>
|
||||
<input type="text" class="form-control" id="tenant-feishu-appid" placeholder="留空则使用全局配置">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">飞书 App Secret</label>
|
||||
<input type="password" class="form-control" id="tenant-feishu-appsecret" placeholder="留空则使用全局配置">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">绑定的飞书群 Chat ID(每行一个)</label>
|
||||
<textarea class="form-control" id="tenant-feishu-chatgroups" rows="3" placeholder="oc_xxxxxxxx oc_yyyyyyyy"></textarea>
|
||||
<div class="form-text">将飞书群绑定到此租户,机器人在该群收到消息时自动使用此租户的知识库</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
|
||||
|
||||
Reference in New Issue
Block a user