feat(tenant): 隔离客服通知文件与后台任务

This commit is contained in:
yml
2026-11-15 16:23:28 +08:00
parent c7dacfa025
commit e994fd9166
52 changed files with 1670 additions and 254 deletions
@@ -35,12 +35,12 @@ func resolveSupportScene(raw string) (scene, title, groupCode, welcome string) {
}
// pickSupportAdminForScene 按分组选人;分组无成员或失败时回退默认客服逻辑。
func pickSupportAdminForScene(tx *gorm.DB, groupCode string) uint64 {
func pickSupportAdminForScene(tx *gorm.DB, groupCode string, tenantID uint64) uint64 {
groupCode = strings.TrimSpace(groupCode)
if groupCode != "" {
if id, err := supportgroup.PickSupportAdmin(tx, groupCode); err == nil && id > 0 {
if id, err := supportgroup.PickSupportAdminForTenant(tx, groupCode, tenantID); err == nil && id > 0 {
return id
}
}
return defaultSupportAdminID(tx)
return defaultSupportAdminID(tx, tenantID)
}