LoadLibraryCount 加载空间知识库数量
(eid int64)
| 259 | |
| 260 | // LoadLibraryCount 加载空间知识库数量 |
| 261 | func (s *Space) LoadLibraryCount(eid int64) error { |
| 262 | var count int64 |
| 263 | if err := DB.Model(&Library{}).Where("eid = ? AND space_id = ?", eid, s.ID).Count(&count).Error; err != nil { |
| 264 | return err |
| 265 | } |
| 266 | s.LibraryCount = count |
| 267 | return nil |
| 268 | } |
| 269 | |
| 270 | // DeleteSpace 删除空间 |
| 271 | func DeleteSpace(eid int64, id int64) error { |
no outgoing calls
no test coverage detected