(eid int64, result *EntityScopeNarrowResult)
| 987 | } |
| 988 | |
| 989 | func (s *SearchService) refreshEntityScopeNarrowLibraries(eid int64, result *EntityScopeNarrowResult) { |
| 990 | if result == nil { |
| 991 | return |
| 992 | } |
| 993 | |
| 994 | result.NarrowedLibraries = entityScopeNarrowLibrariesFromIDs(result.NarrowedLibraryIDs) |
| 995 | libraries, err := s.buildEntityScopeNarrowLibraries(eid, result.NarrowedLibraryIDs) |
| 996 | if err != nil { |
| 997 | logger.SysDebugf("【实体范围】知识库名称加载失败: eid=%d, library_count=%d, err=%v", |
| 998 | eid, len(result.NarrowedLibraryIDs), err) |
| 999 | return |
| 1000 | } |
| 1001 | result.NarrowedLibraries = libraries |
| 1002 | } |
| 1003 | |
| 1004 | func (s *SearchService) buildEntityScopeNarrowLibraries(eid int64, libraryIDs []int64) ([]EntityScopeNarrowLibrary, error) { |
| 1005 | if len(libraryIDs) == 0 { |
no test coverage detected